Styl borderLeftStyle Vlastnost
Příklad
Přidejte „plné“ levé ohraničení k prvku <div>:
document.getElementById("myDiv").style.borderLeftStyle = "solid";
Definice a použití
Vlastnost borderLeftStyle nastavuje nebo vrací styl levého okraje prvku.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
borderLeftStyle | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost borderLeftStyle:
object.style.borderLeftStyle
Nastavte vlastnost borderLeftStyle:
object.style.borderLeftStyle = value
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | žádný |
---|---|
Návratová hodnota: | Řetězec představující styl levého okraje prvku |
Verze CSS | CSS1 |
Další příklady
Příklad
Změňte styl levého okraje prvku <div> na „tečkovaný“:
document.getElementById("myDiv").style.borderLeftStyle = "dotted";
Příklad
Vraťte styl levého ohraničení prvku <div>:
alert(document.getElementById("myDiv").style.borderLeftStyle);
Příklad
Ukázka všech různých hodnot:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderLeftStyle = listValue;
Související stránky
CSS tutoriál: CSS Border
CSS reference: vlastnost ve stylu border-left
Odkaz HTML DOM: vlastnost border