目录

style borderBottomStyle 属性

示例

向 <div> 元素添加 "solid" 底部边框:

document.getElementById("myDiv").style.borderBottomStyle = "solid";
亲自试一试 »

描述

borderBottomStyle 属性设置或返回元素下边框的样式。


浏览器支持

表中的数字指定完全支持该属性的第一个浏览器版本。

Property
borderBottomStyle 1.0 5.5 1.0 1.0 9.2

语法

返回 borderBottomStyle 属性:

object.style.borderBottomStyle

设置 borderBottomStyle 属性:

object.style.borderBottomStyle = value

属性值

Value Description
none Defines no border. This is default
hidden Same as "none", except in border conflict resolution for table elements
dotted Defines a dotted border
dashed Defines a dashed border
solid Defines a solid border
double Defines two borders. The width of the two borders are the same as the border-width value
groove Defines a 3D grooved border. The effect depends on the border-color value
ridge Defines a 3D ridged border. The effect depends on the border-color value
inset Defines a 3D inset border. The effect depends on the border-color value
outset Defines a 3D outset border. The effect depends on the border-color value
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit


技术细节

默认值: 没有任何
返回值: 一个 String,表示元素下边框的样式
CSS版本 CSS1

更多示例

示例

将 <div> 元素的下边框样式更改为 "dotted":

document.getElementById("myDiv").style.borderBottomStyle = "dotted";
亲自试一试 »

示例

返回 <div> 元素的底部边框样式:

alert(document.getElementById("myDiv").style.borderBottomStyle);
亲自试一试 »

示例

所有不同值的演示:

var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;
亲自试一试 »

相关页面

CSS教程:CSS 边框

CSS 参考:border-bottom-style 属性

HTML DOM 参考:边境属性