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