Стиль borderLeftStyle Свойство
Пример
Добавьте «сплошную» левую границу к элементу <div>:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Определение и использование
Свойство borderLeftStyle задает или возвращает стиль левой границы элемента.
Поддержка браузера
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
Синтаксис
Верните свойство borderLeftStyle:
object.style.borderLeftStyle
Задайте свойство borderLeftStyle:
object.style.borderLeftStyle = value
Значения свойств
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
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> на «точечный»:
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Пример
Вернуть стиль левой границы элемента <div>:
alert(document.getElementById("myDiv").style.borderLeftStyle);
Пример
Демонстрация всех различных значений:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
Связанные страницы
Учебное пособие по CSS: граница CSS
Справочник по CSS: свойство border-left-style
Справочник по HTML DOM: свойство границы