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 : none or hidden ,值为 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;
}