CSS中的border-block-start-color屬性用於在樣式表中的單個位置定義單個邏輯block-start邊框屬性值。此屬性將border-color設置在定義元素邊框的頂部。
用法:
border-block-start-color:border-color;
屬性值:
- border-color:此屬性保留邊框的顏色。
以下示例說明了CSS中的border-block-start-color屬性:
範例1:
<!DOCTYPE html>
<html>
<head>
<title>CSS | border-block-start-color Property</title>
<style>
h1 {
color:green;
}
div {
background-color:yellow;
width:220px;
height:40px;
}
.one {
border:5px solid gray;
border-block-start-color:yellow;
background-color:purple;
}
</style>
</head>
<body>
<center>
<h1>Geeksforgeeks</h1>
<b>CSS | border-block-start-color Property</b>
<br><br>
<div class="one">A Computer Science Portal</div>
</center>
</body>
</html>
輸出:
範例2:
<!DOCTYPE html>
<html>
<head>
<title>CSS | border-block-start-color Property</title>
<style>
h1 {
color:green;
}
div {
background-color:yellow;
width:220px;
height:40px;
}
.one {
border:5px solid black;
border-block-start-color:green;
background-color:purple;
}
</style>
</head>
<body>
<center>
<h1>Geeksforgeeks</h1>
<b>CSS | border-block-start-color Property</b>
<br><br>
<div class="one">A Computer Science Portal</div>
</center>
</body>
</html>
輸出:
支持的瀏覽器:下麵列出了border-block-start-color屬性支持的瀏覽器:
- Firefox
- Opera
- Edge
注:本文由純淨天空篩選整理自 CSS | border-block-start-color Property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。