CSS - border-inline-end-width 属性



CSS 属性 border-inline-end-width 确定元素的逻辑边框宽度,然后将其转换为物理边框宽度。

可能的值

语法


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

适用于

所有 HTML 元素。

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

以下示例演示了 border-inline-end-width 属性和 length value 的用法。


<html>
<head>
<style>
	 	.container {
	 	 	 background-color: lightgreen;
	 	 	 width: 350px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.custom-box {
	 	 	 border: 4px dashed #e74c3c;
	 	 	 border-inline-end-width: 10px;
	 	 	 padding: 10px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 16px;
	 	 	 color: #333;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="custom-box">A example with border-inline-end-width property.</p>
</div>
</body>
</html>

CSS border-inline-end-width - 瘦值

以下示例演示了 border-inline-end-width 属性以及 thin width 值的用法。


<html>
<head>
<style>
	 	.container {
	 	 	 background-color: #7aecf0;
	 	 	 width: 350px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.custom-box {
	 	 	 border: 4px solid #141edb;
	 	 	 border-inline-end-width: thin;
	 	 	 padding: 10px;
	 	 	 margin: 10px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 20px;
	 	 	 color: #333;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="custom-box">A example with border-inline-end-width property thin value.</p>
</div>
</body>
</html>

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

以下示例演示了 border-inline-end-width 属性以及 medium width 值的用法。


<html>
<head>
<style>
	 	.container {
	 	 	 background-color: #7aecf0;
	 	 	 width: 350px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.custom-box {
	 	 	 border: 8px solid #141edb;
	 	 	 border-inline-end-width: medium;
	 	 	 padding: 10px;
	 	 	 margin: 10px;
	 	 	 text-align: center;
	 	 	 font-family: 'Arial', sans-serif;
	 	 	 font-size: 18px;
	 	 	 color: #333;
	 	}
</style>
</head>
<body>
<div class="container">
<p class="custom-box">A example with border-inline-end-width property medium value.</p>
</div>
</body>
</html>

CSS border-inline-end-width - 厚值

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


<html>
<head>
<style>
	 	.custom-container {
	 	 	 background-color: #f0f0f0;
	 	 	 width: 250px;
	 	 	 height: 350px;
	 	 	 display: flex;
	 	 	 align-items: center;
	 	 	 justify-content: center;
	 	}
	 	.demo-box {
	 	 	 writing-mode: vertical-rl;
	 	 	 border: 1px solid #3498db;
	 	 	 border-inline-end-width: thick;
	 	 	 padding: 15px;
	 	 	 margin-bottom: 10px;
	 	 	 text-align: center;
	 	 	 font-family: 'Verdana', sans-serif;
	 	 	 font-size: 18px;
	 	 	 color: #333;
	 	}
</style>
</head>
<body>
<div class="custom-container">
<p class="demo-box">An example with border-inline-end-width property with verical writing mode.</p>
</div>
</body>
</html>