Style borderBottomWidthPropiedad
Objeto Style
Definición y uso
La propiedad borderBottomWidth establece o devuelve el ancho del borde inferior de un elemento.
Sintaxis
Establecer la propiedad borderBottomWidth:
Object.style.borderBottomWidth="thin|medium|thick|length|inherit"
Devolver la propiedad borderBottomWidth:
Object.style.borderBottomWidth
| Valor | Descripción |
|---|---|
| thin | Define un borde delgado. |
| medium | Predeterminado. Define un borde mediano. |
| thick | Define un borde grueso. |
| length | Define el ancho del borde usando unidades como px, cm, etc. |
| inherit | El ancho del borde inferior se hereda del elemento padre. |
Compatibilidad del navegador
![]()
![]()
![]()
![]()
![]()
Todos los navegadores principales soportan la propiedad borderBottomWidth.
Nota:IE7 y versiones anteriores no soportan el valor "inherit". IE8 solo soporta "inherit" si se especifica !DOCTYPE. IE9 soporta "inherit".
Ejemplo
Ejemplo
Cambiar el ancho del borde inferior:
<html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderBottomWidth="thick";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change width of bottom border</button>
</body>
</html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderBottomWidth="thick";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change width of bottom border</button>
</body>
</html>
Pruébalo »
Objeto Style Otras extensiones