HTML DOM propiedad Estilo borderLeftWidth
Objetos de estilo
Definición y Uso
borderLeftWidth conjuntos de propiedades o devuelve el ancho del borde izquierdo del elemento.
gramática
Configuración de las propiedades borderLeftWidth:
Object.style.borderLeftWidth="thin|medium|thick|length|inherit"
Volver propiedades borderLeftWidth:
Object.style.borderLeftWidth
值 | 描述 |
---|---|
thin | 定义细的边框。 |
medium | 默认。定义中等的边框。 |
thick | 定义粗的边框。 |
length | 使用 px、cm 等单位定义边框的宽度。 |
inherit | 左边框的宽度从父元素继承。 |
Soporte para el navegador
Todos los principales navegadores soportan la propiedad borderLeftWidth.
Nota: Internet Explorer 7 y versiones anteriores no son compatibles con el valor "heredar".IE8 sólo proporciona! DOCTYPE apoyado "hereda". apoyo IE9 "hereda".
Ejemplos
Ejemplos
Cambiar el ancho del borde izquierdo:
<! DOCTYPE html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Style type = "text / css">
# {Ex1
frontera: 1px solid # FF0000;
}
</ Style>
<Script>
displayResult función () {
document.getElementById ( "EX1") style.borderLeftWidth = "gruesa" .;
}
</ Script>
</ Head>
<Cuerpo>
<Div id = "EX1"> Esto es un texto. </ Div>
<br>
<Botón type = "button" onclick = "displayResult ()"> modificar el ancho del borde izquierdo </ botón>
</ Body>
</ Html>
<Html>
<Head>
<Charset Meta = "UTF-8">
<Title> Este tutorial (w3big.com) </ title>
<Style type = "text / css">
# {Ex1
frontera: 1px solid # FF0000;
}
</ Style>
<Script>
displayResult función () {
document.getElementById ( "EX1") style.borderLeftWidth = "gruesa" .;
}
</ Script>
</ Head>
<Cuerpo>
<Div id = "EX1"> Esto es un texto. </ Div>
<br>
<Botón type = "button" onclick = "displayResult ()"> modificar el ancho del borde izquierdo </ botón>
</ Body>
</ Html>
Trate »
Objetos de estilo