Style borderLeftStyle Property
Przykład
Dodaj "solidne" lewe obramowanie do elementu <div>:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Definicja i użycie
Właściwość borderLeftStyle ustawia lub zwraca styl lewego obramowania elementu.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość borderLeftStyle:
object.style.borderLeftStyle
Ustaw właściwość borderLeftStyle:
object.style.borderLeftStyle = value
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | Żaden |
---|---|
Wartość zwrotu: | String, reprezentujący styl lewego obramowania elementu |
Wersja CSS | CSS1 |
Więcej przykładów
Przykład
Zmień styl lewego obramowania elementu <div> na „dotted”:
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Przykład
Zwróć styl lewego obramowania elementu <div>:
alert(document.getElementById("myDiv").style.borderLeftStyle);
Przykład
Demonstracja wszystkich różnych wartości:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
Powiązane strony
Samouczek CSS: obramowanie CSS
Odniesienie CSS: właściwość w stylu border-left
Odniesienie HTML DOM: border property