CSS 属性

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

属性值

语法

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

适用范围

所有 HTML 元素。

CSS border-inline-start-width: thick

以下示例演示了 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">属性 border-inline-start-width 的示例,其值为 Thick。</p>
</div>
</body>
</html> 

CSS border-inline-start-width: thin

以下示例演示了 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">属性 border-inline-start-width 的示例,其值为 Thin。</p>
</div>
</body>
</html> 

CSS border-inline-start-width: medium

以下示例演示了 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">属性 border-inline-start-width 值为medium 的示例。</p>
</div>
</body>
</html> 

CSS border-inline-start-width: length 

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

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