CSS 属性

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

属性值

语法

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

适用范围

所有 HTML 元素。

CSS border-inline-end-width: length 

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

<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">带有 border-inline-end-width 属性的示例。</p>
</div>
</body>
</html> 

CSS border-inline-end-width: thin

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

<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">具有 border-inline-end-width 属性thin值的示例。</p>
</div>
</body>
</html> 

CSS border-inline-end-width: medium

以下示例演示了 border-inline-end-width 属性与medium值。

<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">具有 border-inline-end-width 属性medium值的示例。</p>
</div>
</body>
</html> 

CSS border-inline-end-width: thick

下面的示例演示了在垂直书写模式 border-inline-end-width 属性的thick值。

<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">具有垂直书写模式的 border-inline-end-width 属性的示例。</p>
</div>
</body>
</html>