• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • border-bottom-width

    CSS属性border-bottom-width设置一个元素的底部边框宽度。

    示例

    /* keyword values */
    border-bottom-width: thin;
    border-bottom-width: medium;
    border-bottom-width: thick;
    
    /* <length> values */
    border-bottom-width: 10em;
    border-bottom-width: 3vmax;
    border-bottom-width: 6px;
    
    /* global keywords */
    border-bottom-width: inherit;
    border-bottom-width: initial;
    border-bottom-width: unset;
    

    浏览器支持

    IE浏览器火狐浏览器opera浏览器chrome浏览器safari浏览器
    浏览器都支持border-bottom-width

    语法

    border-bottom-width:<length>| thin| medium| thick
    • 如使用该复合属性定义其单个参数,则其他参数的默认值将无条件覆盖各自对应的单个属性设置。
    • 对应的脚本特性为borderBottom

    取值

    • <length>:用长度值来定义边框的厚度。不允许负值。参见<length>
    • thin:定义比默认厚度细的边框。计算值为 1px。
    • medium:定义默认厚度的边框。计算值为 3px。
    • thick:定义比默认厚度粗的边框。计算值为 5px。
    默认值medium
    适用于所有元素,也适合::first-letter
    继承性
    动画性
    计算值绝对值。当border-bottom-style:noneorhidden,值为0

    实例

    //HTML
    <div>element 1</div>
    <div>element 2</div>
    
    //CSS
    div { 
      border: 1px solid red;
      margin: 1em 0;
    }
    
    div:nth-child(1) {
      border-bottom-width: thick;
    }
    div:nth-child(2) {
      border-bottom-width: 2em;
    }