📜  HTML | DOM 样式 outlineWidth 属性

📅  最后修改于: 2021-11-03 10:14:29             🧑  作者: Mango

DOM Style outlineWidth属性用于设置或返回元素周围轮廓的宽度。轮廓是在元素边界外围绕指定元素创建的线条,以使特定元素更清晰更易于区分。

句法:

  • 它返回outlineWidth 属性。
    object.style.outlineWidth
  • 它用于设置outlineWidth 属性。
    object.style.outlineWidth = "thin|medium|thick|length|initial|
    inherit"

属性值:

  • 细:将轮廓宽度设置为细,得到的轮廓比宽度为中和粗的轮廓更细。
    例子:
    
    
          
    
        
            DOM Style outlineWidth Property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

            GeeksforGeeks is a computer science portal         with a huge variety of well written and          explained computer science and programming         articles, quizzes and interview questions.         The portal also has dedicated GATE preparation         and competitive programming sections.     

                                                        

    输出:

    • 点击按钮前:
      瘦前
    • 点击按钮后:
      瘦后
  • 中:它将轮廓宽度设置为默认值。轮廓的宽度比设置为粗的轮廓更细,比设置为细的轮廓更粗。
    例子:
    
    
          
    
        
            DOM Style outlineWidth Property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

            GeeksforGeeks is a computer science portal         with a huge variety of well written and          explained computer science and programming         articles, quizzes and interview questions.         The portal also has dedicated GATE preparation         and competitive programming sections.     

                                                        

    输出:

    • 点击按钮前:
      中前
    • 点击按钮后:
      中后
  • 粗:将轮廓宽度设置为粗,实现的轮廓比宽度为中等的轮廓更粗,并认为。
    例子:
    
    
          
    
        
            DOM Style outlineWidth Property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

            GeeksforGeeks is a computer science portal         with a huge variety of well written and          explained computer science and programming         articles, quizzes and interview questions.         The portal also has dedicated GATE preparation         and competitive programming sections.     

                                                        

    输出:

    • 点击按钮前:
      厚厚的
    • 点击按钮后:
      厚后
  • length:用于以长度单位定义轮廓宽度。
    例子:
    
    
          
    
        
            DOM Style outlineWidth Property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

            GeeksforGeeks is a computer science portal         with a huge variety of well written and          explained computer science and programming         articles, quizzes and interview questions.         The portal also has dedicated GATE preparation         and competitive programming sections.     

                                                        

    输出:

    • 点击按钮前:
      前长度
    • 点击按钮后:
      后长度
  • initial:用于将此属性设置为其默认值。
    例子:
    
    
          
    
        
            DOM Style outlineWidth Property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

            GeeksforGeeks is a computer science portal         with a huge variety of well written and          explained computer science and programming         articles, quizzes and interview questions.         The portal also has dedicated GATE preparation         and competitive programming sections.     

                                                        

    输出:

    • 点击按钮前:
      初始之后
    • 点击按钮后:
      初始之后
  • 继承:这从其父级继承属性。
    例子:
    
    
          
    
        
            DOM Style outlineWidth property
        
      
        
    
      
    
        

            GeeksforGeeks     

               DOM Style OutlineWidth            

               
            

                GeeksforGeeks is a computer science portal             with a huge variety of well written and              explained computer science and programming             articles, quizzes and interview questions.             The portal also has dedicated GATE preparation             and competitive programming sections.         

        
               
                                                        

    输出:

    • 点击按钮前:
      先继承
    • 点击按钮后:
      继承

    支持的浏览器: DOM Style outlineWidth 属性支持的浏览器如下:

    • 谷歌浏览器
    • IE浏览器
    • 火狐
    • 歌剧
    • 苹果Safari