propriedade HTML DOM Estilo borderLeftStyle
estilo Objects
Definição e Uso
borderLeftStyle conjuntos de propriedades ou retorna o elemento no estilo de borda esquerda.
gramática
Definindo as propriedades borderLeftStyle:
Object.style.borderLeftStyle="value"
Propriedades volta borderLeftStyle:
Object.style.borderLeftStyle
值 | 描述 |
---|---|
none | 默认。定义无边框。 |
hidden | 与 "none" 相同。不过应用于表时除外,对于表,hidden 用于解决边框冲突。 |
dotted | 定义点状边框。 |
dashed | 定义虚线边框。 |
solid | 定义实线边框。 |
double | 定义双线边框。双线的宽度等于 border-width 的值。 |
groove | 定义 3D 凹槽边框。其效果取决于 border-color 的值。 |
ridge | 定义 3D 垄状边框。其效果取决于 border-color 的值。 |
inset | 定义 3D inset 边框。其效果取决于 border-color 的值。 |
outset | 定义 3D outset 边框。其效果取决于 border-color 的值。 |
inherit | 左边框的样式从父元素继承。 |
Suporte a navegadores
Todos os principais navegadores suportam propriedade borderLeftStyle.
Nota: IE7 e versões anteriores não suportam o valor "herdar".IE8 só fornece! DOCTYPE suportado "herdar". suporte IE9 "herdar".
Exemplos
Exemplos
Mude o estilo da borda esquerda:
<html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderLeftStyle="dotted";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change style of left border</button>
</body>
</html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderLeftStyle="dotted";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change style of left border</button>
</body>
</html>
tente »
estilo Objects