Borde de estilo Propiedad derecha
Ejemplo
Agregue un borde derecho a un elemento <div>:
document.getElementById("myDiv").style.borderRight = "thick solid #0000FF";
Definición y uso
La propiedad borderRight establece o devuelve hasta tres propiedades independientes del borde derecho, en forma abreviada.
Con esta propiedad, puede establecer/devolver uno o más de los siguientes (en cualquier orden):
- borde-derecho-ancho
- borde-derecho-estilo
- borde-derecho-color
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
borderRight | Yes | Yes | Yes | Yes | Yes |
Sintaxis
Devuelve la propiedad borderRight:
object.style.borderRight
Establezca la propiedad borderRight:
object.style.borderRight = "width style color|initial|inherit"
Valores de propiedad
Parameter | Description |
---|---|
width | Sets the width of the right border |
style | Sets the style of the right border |
color | Sets the color of the right border |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detalles técnicos
Valor por defecto: | No especificado |
---|---|
Valor de retorno: | Una cadena, que representa el ancho, el estilo y/o el color del borde derecho de un elemento |
Versión CSS | CSS1 |
Más ejemplos
Ejemplo
Cambia el ancho, el estilo y el color del borde derecho de un elemento <div>:
document.getElementById("myDiv").style.borderLeft = "thin dotted red";
Ejemplo
Devuelve los valores de propiedad del borde derecho de un elemento <div>:
alert(document.getElementById("myDiv").style.borderLeft);
páginas relacionadas
Tutorial de CSS: Borde CSS
Referencia CSS: propiedad border-right
Referencia HTML DOM: propiedad de borde