HTMLDOMスタイルのcolumnRuleプロパティ
HTML DOMのcolumnRuleプロパティは、columnRuleプロパティを取得または設定するために使用されます。これは、columnRuleColor、columnRuleStyle、columnRuleWidthという名前の3つのプロパティを操作するための省略形のプロパティです。
以下は、-
の構文です。columnRuleプロパティの設定-
object.style.columnRule = "column-rule-width column-rule-style column-rule-color|initial|inherit"
上記の特性は次のように説明されます-
| columnRuleWidth | 列間のルール幅を設定します。デフォルトでは中に設定されています。 |
| columnRuleStyle | F列間のルールスタイルを設定します。デフォルトではnoneに設定されています。 |
| columnRuleColor | 列間のルールスタイルを設定します。デフォルトではnoneに設定されています。 |
| columnRuleColor | 列間のルールの色を設定します。デフォルトでは要素の色の値に設定されています。 |
| 初期 | このプロパティを初期値に設定します。 |
| 継承 | 親プロパティ値を継承します。 |
columnRuleプロパティの例を見てみましょう-
例
<!DOCTYPE html>
<html>
<head>
<style>
#DIV1 {
column-count: 4;
column-rule: 4px dashed darkolivegreen;
}
</style>
<script>
function changeColumnRule(){
document.getElementById("DIV1").style.columnRule="10px solid red";
document.getElementById("Sample").innerHTML="The column rule properties are now modified";
}
</script>
</head>
<body>
<div id="DIV1">
<img src="https://www.tutorialspoint.com/images/Swift.png"><br/>
<img src="https://www.tutorialspoint.com/images/xamarian.png"><br/>
<img src="https://www.tutorialspoint.com/images/pl-sql.png"><br/>
<img src="https://www.tutorialspoint.com/images/asp-net.png"><br/>
<img src="https://www.tutorialspoint.com/images/powerbi.png"><br/>
<img src="https://www.tutorialspoint.com/images/Tableau.png"><br/>
<img src="https://www.tutorialspoint.com/images/Big-Data-Analytics.png"><br/>
<img src="https://www.tutorialspoint.com/images/microsoftproject.png">
</div>
<p>Change the above div column rule properties by clicking the below button</p>
<button onclick="changeColumnRule()">Change Column Rule</button>
<p id="Sample"></p>
</body>
</html> 出力
「列ルールの変更」をクリックすると ボタン-
-
HTMLDOMスタイルcolumnRuleStyleプロパティ
HTML DOMスタイルcolumnRuleStyleプロパティは、列ルールのスタイルを定義または返すために使用されます。 以下は、-の構文です。 columnRuleStyleプロパティの設定- object.style.columnRuleStyle = "none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset| initial|inherit" 上記のプロパティ値は次のように説明されます- 値 説明 なし これは、ルールを指定しないデフォルト値です。 非表示 これは「non
-
HTMLDOMスタイルcolumnRuleColorプロパティ
HTML DOMのcolumnRuleColorプロパティは、列間のルールの色を設定または返すために使用されます。 以下は、-の構文です。 columnRuleColorプロパティの設定- object.style.columnRuleColor = "color|initial|inherit" ここで、colorはルールの色を指定します。 Initialは値をデフォルト値に設定し、inheritはそれを親プロパティ値に設定します。 columnRuleColorプロパティの例を見てみましょう- 例 <!DOCTYPE html> <html&g