CSS中的border-inline-width屬性用於在樣式表的單個位置設置單個邏輯內聯border-width屬性值。它將邊界寬度設置為定義邊框元素的頂部和底部。
用法:
border-inline-width:width;
屬性值:
- width:此屬性保存邊框的寬度。
以下示例說明了CSS中的border-inline-width屬性:
範例1:
<!DOCTYPE html>
<html>
<head>
<title>CSS | border-inline-width Property</title>
<style>
h1 {
color:green;
}
div {
background-color:yellow;
width:220px;
height:40px;
}
.one {
border:5px dashed cyan;
border-inline-width:2px;
background-color:purple;
}
</style>
</head>
<body>
<center>
<h1>Geeksforgeeks</h1>
<b>CSS | border-inline-width Property</b>
<br><br>
<div class="one">A Computer Science Portal</div>
</center>
</body>
</html>
輸出:
範例2:
<!DOCTYPE html>
<html>
<head>
<title>CSS | border-inline-width Property</title>
<style>
h1 {
color:green;
}
div {
background-color:yellow;
width:220px;
height:40px;
}
.one {
border:5px solid cyan;
border-inline-width:2px;
background-color:purple;
}
</style>
</head>
<body>
<center>
<h1>Geeksforgeeks</h1>
<b>CSS | border-inline-width Property</b>
<br><br>
<div class="one">A Computer Science Portal</div>
</center>
</body>
</html>
輸出:
支持的瀏覽器:下麵列出了border-inline-width屬性支持的瀏覽器:
- Firefox
- Opera
- Edge
參考: https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-width
相關用法
- CSS transition-property用法及代碼示例
- CSS top屬性用法及代碼示例
- CSS right屬性用法及代碼示例
- CSS all屬性用法及代碼示例
- CSS nav-up用法及代碼示例
- CSS nav-down用法及代碼示例
- CSS nav-right用法及代碼示例
- CSS box-sizing用法及代碼示例
- CSS animation-name用法及代碼示例
- CSS inset 屬性用法及代碼示例
- CSS content屬性用法及代碼示例
- CSS max-width用法及代碼示例
- CSS border-top用法及代碼示例
- HTML DOM URL用法及代碼示例
- CSS visibility屬性用法及代碼示例
注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 CSS | border-inline-width Property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。