border-bottom-width属性用于设置一个元素的底部边框的宽度。
一个元素底部的边框宽度可以使用值来明确指定,也可以使用三个预定义的关键字来指定: thin 、 medium 和 thick 。
官方语法border-bottom-width: <length> | thin | medium | thick
参数:
<length> :指定边框的宽度,不允许为负值。 thin :预定义边框宽度。 medium :预定义边框宽度。 thick :预定义边框宽度。border-bottom-width 属性的初始值为 medium 。
注意: border-bottom-width 属性的初始值为 medium ,但是元素的 border 属性的初始值为 none ,其宽度为0。
下面是 border-bottom-width 属性取值的示例代码:
/* 可以是任何 <length> 值 */ border-bottom-width: 10em; border-bottom-width: 3vmax; border-bottom-width: 6px; /* 可以是预定义关键字 */ border-bottom-width: thin; border-bottom-width: medium; border-bottom-width: thick; border-bottom-width: inherit;示例代码
下面的代码将元素的底部边框设置为10像素的红色实线。
.element { border-bottom-style: solid; border-bottom-width: 10px; border-bottom-color: red; }在线演示
底部边宽度为30像素蓝色实线
底部边宽度为关键字:thin
底部边宽度为关键字:medium
底部边宽度为关键字:thick
浏览器支持
所有的现代浏览器都支持 border-bottom-width 属性,包括Chrome,Firefox,Safari,Opera,IE 以及 Android 和 iOS。
查看更多关于border-bottom-width的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did31590