Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. CSS:层叠样式表
  3. CSS 参考
  4. Properties
  5. border-inline-start-color

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

border-inline-start-color

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2020年1月⁩.

CSS 属性border-inline-start-color 定义了元素的逻辑行首的边框颜色,并根据元素的书写模式、行内方向和文本朝向对应至实体边框颜色。根据writing-modedirectiontext-orientation 所定义的值,此属性对应于border-top-colorborder-right-colorborder-bottom-colorborder-left-color 属性。

尝试一下

border-inline-start-color: red;writing-mode: horizontal-tb;
border-inline-start-color: #32a1ce;writing-mode: vertical-rl;
border-inline-start-color: rgb(170, 50, 220, 0.6);writing-mode: horizontal-tb;direction: rtl;
<section>  <div>    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;}

语法

css
border-inline-start-color: red;border-inline-start-color: #ee4141;/* 全局值 */border-inline-start-color: inherit;border-inline-start-color: initial;border-inline-start-color: revert;border-inline-start-color: revert-layer;border-inline-start-color: unset;

与此相关的属性有border-block-start-colorborder-block-end-colorborder-inline-end-color,这些属性定义了元素其他边框的颜色。

取值

<'color'>

边框颜色。见color

形式定义

初始值currentcolor
适用元素所有元素
是否是继承属性
计算值颜色计算值
动画类型按计算值的类型

形式语法

border-inline-start-color =
<color>|
<image-1D>

<image-1D> =
<stripes()>

<stripes()> =
stripes(<color-stripe>#)

<color-stripe> =
<color>&&
[<length-percentage>|<flex>]?

<length-percentage> =
<length>|
<percentage>

示例

HTML

html
<div>  <p>示例文本</p></div>

CSS

css
div {  background-color: yellow;  width: 120px;  height: 120px;}.exampleText {  writing-mode: vertical-lr;  border: 10px solid blue;  border-inline-start-color: red;}

规范

Specification
CSS Logical Properties and Values Level 1
# border-color

浏览器兼容性

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp