Стиль borderLeftColor Свойство
Пример
Измените цвет левой границы элемента <div> на красный:
document.getElementById("myDiv").style.borderLeftColor = "red";
Определение и использование
Свойство borderLeftColor задает или возвращает цвет левой границы элемента.
Поддержка браузера
Property | |||||
---|---|---|---|---|---|
borderLeftColor | Yes | Yes | Yes | Yes | Yes |
Синтаксис
Верните свойство borderLeftColor:
object.style.borderLeftColor
Задайте свойство borderLeftColor:
object.style.borderLeftColor = "color|transparent|initial|inherit"
Значения свойств
Value | Description |
---|---|
color | Specifies the color of the left border. Look at CSS Color Values for a complete list of possible color values. Default color is the current color of the element |
transparent | The color of the left border is transparent (underlying content will shine through) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Технические детали
Значение по умолчанию: | текущий цвет |
---|---|
Возвращаемое значение: | Строка, представляющая цвет левой границы элемента. |
CSS-версия | CSS1 |
Дополнительные примеры
Пример
Вернуть цвет левой границы элемента <div>:
alert(document.getElementById("myDiv").style.borderLeftColor);
Связанные страницы
Учебное пособие по CSS: граница CSS
Справочник по CSS: свойство border-left-color
Справочник по HTML DOM: свойство границы