スタイル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 Border
CSSリファレンス:border-left-styleプロパティ
HTML DOMリファレンス:borderプロパティ