设置元素的边框下边框的宽度。
可能的值
- length − 任何长度单位。此属性的长度单位不能为负数。
- thin − 比设置为中等的边框更薄的边框。
- medium − 比设置为薄的边框厚的边框厚,比设置为厚的边框更薄的边框。
- thick − 比设置为中等的边框更厚的边框。
适用于
所有 HTML 元素。
DOM 语法
object.style.borderBottomWidth = "2px";
始终在 border-bottom-width 属性之前声明 border-style 或 border-bottom-style 属性。
以下示例演示了 border-bottom-width 属性:
<html>
<head>
<style>
p {border-style: solid;
border-bottom-width: thin;
}
h2{
border-style: dotted;
border-bottom-width: 10px;
}
</style>
</head>
<body>
<h2>border-bottom-width (single-side)</h2>
<p>Different border widths on all sides. Check the width at the bottom of the element.</p>
</body>
</html>