border-inline-style
border-inline-style CSS 属性定义了一个元素的逻辑行内边框的样式,它会根据元素的书写模式(writing mode)、方向性(directionality)和文本方向(text orientation)映射到物理边框样式。它对应于 border-top-style 和 border-bottom-style,或者 border-left-style 和 border-right-style 属性,具体取决于为 writing-mode、direction 和 text-orientation 定义的值。
试一试
border-inline-style: dotted;
writing-mode: horizontal-tb;
border-inline-style: dotted;
writing-mode: vertical-rl;
border-inline-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: #eeeeee;
  color: black;
  border: 0.75em solid;
  padding: 0.75em;
  width: 80%;
  height: 100px;
  unicode-bidi: bidi-override;
}
另一个维度上的边框样式可以通过 border-block-style 设置,它会设置 border-block-start-style 和 border-block-end-style。
语法
css
/* <'border-style'> values */
border-inline-style: dashed;
border-inline-style: dotted;
border-inline-style: groove;
/* Global values */
border-inline-style: inherit;
border-inline-style: initial;
border-inline-style: revert;
border-inline-style: revert-layer;
border-inline-style: unset;
值
- <'border-style'>
- 
边框的线条样式。请参阅 border-style。
正式定义
正式语法
border-inline-style =
<'border-top-style'>{1,2}
<border-top-style> =
<line-style>
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset
示例
设置 border-inline-style
HTML
html
<div>
  <p class="exampleText">Example text</p>
</div>
CSS
css
div {
  background-color: yellow;
  width: 120px;
  height: 120px;
}
.exampleText {
  writing-mode: vertical-lr;
  border: 5px solid blue;
  border-inline-style: dashed;
}
规范
| 规范 | 
|---|
| CSS 逻辑属性和值第 1 级 # propdef-border-inline-style | 
浏览器兼容性
加载中…