大网数据广告活动
Web 标准与前端开发

border-inline-end-style

· 52CE 我爱测

CSS 属性 **`border-inline-end-style`** 定义了元素的逻辑行末的边框线型,并根据元素的书写模式、行内方向和文本朝向对应至实体边框线型。根据 writing-mode、direction 和 text-orientation 所定义的值,此属性对应于 border-top-style、border-right-style、border-bottom-style 或 border-left-style 属性。

CSS 属性 border-inline-end-style 定义了元素的逻辑行末的边框线型,并根据元素的书写模式、行内方向和文本朝向对应至实体边框线型。根据 writing-mode、direction 和 text-orientation 所定义的值,此属性对应于 border-top-style、border-right-style、border-bottom-style 或 border-left-style 属性。

CSS Demo: border-inline-end-style

border-inline-end-style: dotted;
writing-mode: horizontal-tb;
border-inline-end-style: dotted;
writing-mode: vertical-rl;
border-inline-end-style: groove;
writing-mode: horizontal-tb;
direction: rtl;
<section class="default-example" id="default-example">
  <div class="transition-all" id="example-element">
    This is a box with a border around it.
  </div>
</section>
#example-element {
  background-color: #eee;
  color: #000;
  border: 0.75em solid;
  padding: 0.75em;
  width: 80%;
  height: 100px;
  unicode-bidi: bidi-override;
}

语法

/* 边框线型值 */
border-inline-end-style: dashed;
border-inline-end-style: dotted;
border-inline-end-style: groove;

/* 全局值 */
border-inline-end-style: inherit;
border-inline-end-style: initial;
border-inline-end-style: revert;
border-inline-end-style: revert-layer;
border-inline-end-style: unset;

与此相关的属性有 border-block-start-style、border-block-end-style 和 border-inline-start-style,这些属性定义了元素其他边框的线型。

取值

  • <'border-style'>
    • : 边框线型。见 border-style。

形式定义

形式语法

示例

设置行末线型

HTML

<div>
  <p class="exampleText">示例文本</p>
</div>

CSS

div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}

.exampleText {
  writing-mode: vertical-lr;
  border: 5px solid blue;
  border-inline-end-style: dashed;
}

结果

示例

规范

浏览器兼容性

参见

  • CSS 逻辑属性与逻辑值
  • 此属性对应的实体边框属性:border-top-style、border-right-style、border-bottom-style 或 border-left-style
  • writing-mode、direction、text-orientation

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。