当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


CSS border-inline-end用法及代码示例


CSS中的border-inline-end属性用于在样式表中的单个位置定义单个逻辑inline-end边框属性值。此属性将边框放置在定义元素的底部。

用法:

border-inline-end:border-width|border-style|border-color;

属性值:



  • border-width:此属性值保存border-inline-end属性的宽度。
  • border-style:此属性保留可以为虚线,实线等的边框样式。
  • border-color:此属性保留边框的颜色。

以下示例说明了CSS中的border-inline-end属性:

范例1:

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

输出:

范例2:

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

输出:

支持的浏览器:下面列出了border-inline-end属性支持的浏览器:

  • Firefox
  • Opera
  • Edge

参考: https://developer.mozilla.org/en-US/docs/Web/CSS/border-inline-end




相关用法


注:本文由纯净天空筛选整理自skyridetim大神的英文原创作品 CSS | border-inline-end Property。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。