propriedade HTML DOM Estilo borderLeftWidth
estilo Objects
Definição e Uso
borderLeftWidth conjuntos de propriedades ou retorna a largura da borda esquerda do elemento.
gramática
Definindo as propriedades borderLeftWidth:
Object.style.borderLeftWidth="thin|medium|thick|length|inherit"
Propriedades volta borderLeftWidth:
Object.style.borderLeftWidth
值 | 描述 |
---|---|
thin | 定义细的边框。 |
medium | 默认。定义中等的边框。 |
thick | 定义粗的边框。 |
length | 使用 px、cm 等单位定义边框的宽度。 |
inherit | 左边框的宽度从父元素继承。 |
Suporte a navegadores
Todos os principais navegadores suportam propriedade borderLeftWidth.
Nota: IE7 e versões anteriores não suportam o valor "herdar".IE8 só fornece! DOCTYPE suportado "herdar". suporte IE9 "herdar".
Exemplos
Exemplos
Alterar a largura da borda esquerda:
<! DOCTYPE html>
<Html>
<Head>
<Charset Meta = "utf-8">
<Title> Este tutorial (w3big.com) </ title>
<Style type = "text / css">
# Ex1 {
border: 1px solid # FF0000;
}
</ Style>
<Script>
displayResult function () {
document.getElementById ( "EX1") style.borderLeftWidth = "grosso" .;
}
</ Script>
</ Head>
<Body>
<Div id = "EX1"> Este é um texto. </ Div>
<br>
<Button type = "button" onclick = "displayResult ()"> modificar a largura da borda esquerda </ button>
</ Body>
</ Html>
<Html>
<Head>
<Charset Meta = "utf-8">
<Title> Este tutorial (w3big.com) </ title>
<Style type = "text / css">
# Ex1 {
border: 1px solid # FF0000;
}
</ Style>
<Script>
displayResult function () {
document.getElementById ( "EX1") style.borderLeftWidth = "grosso" .;
}
</ Script>
</ Head>
<Body>
<Div id = "EX1"> Este é um texto. </ Div>
<br>
<Button type = "button" onclick = "displayResult ()"> modificar a largura da borda esquerda </ button>
</ Body>
</ Html>
tente »
estilo Objects