HTML DOM propiedad Estilo borderLeftColor
Definición y Uso
BorderLeftColor conjuntos de propiedades o devuelve el color del borde izquierdo del elemento.
gramática
Configuración de las propiedades borderLeftColor:
Object.style.borderLeftColor="color|transparent|inherit"
borderLeftColor propiedades para la espalda:
Object.style.borderLeftColor
Consejo: borderLeftColor propiedad no tiene un valor predeterminado.
值 | 描述 |
---|---|
color | 规定左边框的颜色。在 CSS 颜色值 中寻找可能的颜色值的完整列表。 |
transparent | 左边框的颜色是透明的(基本内容将会穿透)。 |
inherit | 左边框的颜色从父元素继承。 |
Soporte para el navegador
Todos los principales navegadores soportan la propiedad borderLeftColor.
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 color del borde izquierdo:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<style type="text/css">
#ex1{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult(){
document.getElementById("ex1").style.borderLeftColor="#00FF00";
}
</script>
</head>
<body>
<div id="ex1">这是一些文本。</div>
<br>
<button type="button" onclick="displayResult()">修改左边框的颜色</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<style type="text/css">
#ex1{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult(){
document.getElementById("ex1").style.borderLeftColor="#00FF00";
}
</script>
</head>
<body>
<div id="ex1">这是一些文本。</div>
<br>
<button type="button" onclick="displayResult()">修改左边框的颜色</button>
</body>
</html>
Trate »
Objetos de estilo