當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


CSS border-inline-start-style屬性用法及代碼示例


border-inline-start-style屬性是CSS中的內置屬性,用於在樣式表中的單個位置定義單個邏輯inline-end邊界屬性值。此屬性將border-style設置在定義元素邊框的左側。

用法:

border-inline-start-style:border-style;

屬性值:

  • border-style:此屬性保留邊框的樣式。

以下示例說明了CSS中的border-inline-start樣式屬性:

範例1:



<!DOCTYPE html> 
<html> 
   
<head> 
    <title>CSS | border-inline-start-style Property</title> 
    <style> 
        h1 { 
            color:green; 
        } 
           
        div { 
            background-color:yellow; 
            width:220px; 
            height:40px; 
        } 
        .one { 
            border:5px solid gray; 
            border-inline-start-style:dotted; 
            background-color:purple; 
        } 
    </style> 
</head> 
   
<body> 
    <center> 
        <h1>Geeksforgeeks</h1> 
        <b>CSS | border-inline-start-style Property</b> 
        <br><br> 
        <div class="one">A Computer Science Portal</div> 
    </center> 
</body> 
   
</html>

輸出:

範例2:

<!DOCTYPE html> 
<html> 
   
<head> 
    <title>CSS | border-inline-start-style Property</title> 
    <style> 
        h1 { 
            color:green; 
        } 
           
        div { 
            background-color:yellow; 
            width:220px; 
            height:40px; 
        } 
        .one { 
            border:5px solid black; 
            border-inline-start-style:dashed; 
            background-color:purple; 
        } 
    </style> 
</head> 
   
<body> 
    <center> 
        <h1>Geeksforgeeks</h1> 
        <b>CSS | border-inline-start-style Property</b> 
        <br><br> 
        <div class="one">A Computer Science Portal</div> 
    </center> 
</body> 
   
</html>

輸出:

支持的瀏覽器:下麵列出了border-inline-start-style屬性支持的瀏覽器:

  • Firefox
  • Opera
  • Edge

參考: https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-start-style




相關用法


注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 CSS | border-inline-start-style Property。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。