Propiedad del borde derecho de CSS
Ejemplo
Establezca el estilo del borde derecho para diferentes elementos:
h1 {
border-right: 5px solid red;
}
h2 {
border-right: 4px dotted blue;
}
div {
border-right: double;
}
Definición y uso
La border-right
propiedad es una propiedad abreviada para (en el siguiente orden):
- borde-derecho-ancho
- borde-derecho-estilo (obligatorio)
- borde-derecho-color
Si se omite border-right-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.borderRight="5px punteado azul" |
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-right | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Sintaxis CSS
border-right: border-width border-style border-color|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
border-right-width | Required. Specifies the width of the right border. Default value is "medium" |
border-right-style | Required. Specifies the style of the right border. Default value is "none" |
border-right-color | Optional. Specifies the color of the right 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 borderRight