スタイルborderRightWidthプロパティ
例
<div>要素の右の境界線の幅を10pxに変更します。
document.getElementById("myDiv").style.borderRightWidth = "10px";
定義と使用法
borderRightWidthプロパティは、要素の右境界線の幅を設定または返します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
borderRightWidth | Yes | Yes | Yes | Yes | Yes |
構文
borderRightWidthプロパティを返します。
object.style.borderRightWidth
borderRightWidthプロパティを設定します。
object.style.borderRightWidth = "thin|medium|thick|length|initial|inherit"
プロパティ値
Value | Description |
---|---|
thin | Defines a thin border |
medium | Defines a medium border. This is default |
thick | Defines a thick border |
length | The width of the border in length units |
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>要素の右の境界線の幅をthinに変更します。
document.getElementById("myDiv").style.borderRightWidth = "thin";
例
<div>要素の右の境界線の幅を返します。
alert(document.getElementById("myDiv").style.borderRightWidth);
関連ページ
CSSチュートリアル:CSS Border
CSSリファレンス:border-right-widthプロパティ
HTML DOMリファレンス:borderプロパティ
❮スタイルオブジェクト