CSS - border-inline-start-width 属性



CSS 属性 border-inline-start-width 表示元素的逻辑内联开始边框宽度。物理边框宽度由元素的书写模式、方向性和文本方向决定。

可能的值

语法


border-inline-start-width = <line-width> <line-width> = <length [0,∞]> | thin | medium | thick

适用于

所有 HTML 元素。

CSS border-inline-start-width - 厚值

以下示例演示了 border-inline-start-width CSS 属性以及粗宽度值的用法。


	 		
<html>
<head>
<style>
	 	.container {
	 	 	 background-color: #d5d9de;
	 	 	 width: 450px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.customText {
	 	 	 border: 2px dashed #e74c3c;
	 	 	 border-inline-start-width: thick;
	 	 	 padding: 12px;
	 	 	 margin: 15px 15px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 16px;
	 	 	 color: #2c3e50;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="customText">A example with property border-inline-start-width with value as thick.</p>
</div>
</body>
</html>

CSS border-inline-start-width - 瘦值

以下示例演示了 border-inline-start-width CSS 属性以及细宽度值的用法。


	 	 	 	 	
<html>
<head>
<style>
	 	.container {
	 	 	 background-color: #d5d9de;
	 	 	 width: 450px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.customText {
	 	 	 border: 5px dashed #3a43e8;
	 	 	 border-inline-start-width: thin;
	 	 	 padding: 12px;
	 	 	 margin: 15px 15px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 20px;
	 	 	 color: #2c3e50;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="customText">A example with property border-inline-start-width with value as thin.</p>
</div>
</body>
</html>

CSS border-inline-start-width - 中等值

以下示例演示了 border-inline-start-width CSS 属性以及中等宽度值的用法。


	 		
<html>
<head>
<style>
	 	.container {
	 	 	 background-color: #e8e7da;
	 	 	 width: 450px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.customText {
	 	 	 border: 8px solid #c4bb04;
	 	 	 border-inline-start-width: medium;
	 	 	 padding: 12px;
	 	 	 margin: 15px 15px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 20px;
	 	 	 color: #2c3e50;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="customText">A example with property border-inline-start-width with value as medium.</p>
</div>
</body>
</html>

CSS border-inline-start-width - 长度值

以下示例演示了 border-inline-start-width CSS 属性在垂直写入模式和宽度长度值中的用法。


<html>
<head>
<style>
	 	.container {
	 	 	 background-color: lightgrey;
	 	 	 width: 350px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.custom-border {
	 	 	 writing-mode: vertical-rl;
	 	 	 border: 5px ridge #f0d807;
	 	 	 border-inline-start-width: 11px;
	 	 	 padding: 12px;
	 	 	 margin: 15px 15px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 20px;
	 	 	 color: #2c3e50;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="custom-border">A example with border-inline-start-width property and vertical writing mode.</p>
</div>
</body>
</html>