Propiedad de borde inferior de CSS
Ejemplo
Establezca el estilo del borde inferior para diferentes elementos:
h1 {
border-bottom: 5px solid red;
}
h2 {
border-bottom: 4px dotted blue;
}
div {
border-bottom: double;
}
Definición y uso
La border-bottom
propiedad es una propiedad abreviada para (en el siguiente orden):
Si se omite border-bottom-color, el color aplicado será el color del texto.
Valor por defecto: | medio ninguno color |
---|---|
Heredado: | No |
Animable: | si, ver propiedades individuales . Leer sobre animable |
Versión: | CSS1 |
Sintaxis de JavaScript: | objeto .style.borderBottom="15px punteado azul claro" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
border-bottom | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaxis CSS
border-bottom: border-width border-style border-color|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
border-bottom-width | Required. Specifies the width of the bottom border. Default value is "medium" |
border-bottom-style | Required. Specifies the style of the bottom border. Default value is "none" |
border-bottom-color | Optional. Specifies the color of the bottom border. Default value is the color of the text |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
páginas relacionadas
Tutorial de CSS: Borde CSS
Referencia HTML DOM: propiedad borderBottom