CSS |边框-内联-结束属性

原文:https://www . geesforgeks . org/CSS-border-inline-end-property/

CSS 中的边框内联结束属性用于在样式表的单个位置定义单个逻辑内联结束边框属性值。此属性将边框放置在定义元素的底部。

语法:

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

属性值:

  • 边框宽度:该属性值保存边框内联结束属性的宽度。
  • 边框样式:该属性保存可以是虚线、实线等的边框样式。
  • 边框颜色:该属性保存边框的颜色。

以下示例说明了 CSS 中的边框内联结束属性:

例 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>

输出:

支持的浏览器:边框内联端属性支持的浏览器如下:

  • 火狐浏览器
  • 歌剧
  • 边缘

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