HTML DOM propiedad Estilo borderTopStyle
Objetos de estilo
Definición y Uso
borderTopStyle conjuntos de propiedades o devuelve los elementos de estilo frontera.
gramática
Configuración de las propiedades borderTopStyle:
Object.style.borderTopStyle="value"
Volver propiedades borderTopStyle:
Object.style.borderTopStyle
值 | 描述 |
---|---|
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 | 上边框的样式从父元素继承。 |
Soporte para el navegador
Todos los principales navegadores soportan la propiedad borderTopStyle.
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 estilo de borde:
<! 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.borderTopStyle = "punteada" .;
}
</ Script>
</ Head>
<Cuerpo>
<Div id = "EX1"> Esto es un texto. </ Div>
<br>
<Botón type = "button" onclick = "displayResult ()"> Modificar el estilo de borde 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.borderTopStyle = "punteada" .;
}
</ Script>
</ Head>
<Cuerpo>
<Div id = "EX1"> Esto es un texto. </ Div>
<br>
<Botón type = "button" onclick = "displayResult ()"> Modificar el estilo de borde botón </>
</ Body>
</ Html>
Trate »
Objetos de estilo