在线文档教程
CSS
逻辑属性 | Logical Properties

边界块初始颜色 | border-block-start-color

边框块-开始颜色

这是一种实验技术

由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。还要注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。

border-block-start-color 映射到依赖于要素的写作模式,方向性和文本方向的物理边框颜色的逻辑块开始边框的颜色。它对应于border-top-colorborder-right-colorborder-bottom-color,或border-left-color属性根据为定义的值writing-modedirectiontext-orientation

border-block-start-color: blue; border-block-start-color: #4c5d21;

相关属性是border-block-end-colorborder-inline-start-color,和border-inline-end-color定义元素的其他边框颜色。

初始值currentcolor
应用于all elements
是否继承no
适用媒体visual
计算值computed color
Animation typediscrete
规范顺序the unique non-ambiguous order defined by the formal grammar

句法

价值

<'color'>参见 border-color

形式语法

<'color'>where <color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color> where <rgb()> = rgb( [ [ <percentage>{3} | <number>{3} ] [ / <alpha-value> ]? ] | [ [ <percentage>#{3} | <number>#{3} ] , <alpha-value>? ] ) <rgba()> = rgba( [ [ <percentage>{3} | <number>{3} ] [ / <alpha-value> ]? ] | [ [ <percentage>#{3} | <number>#{3} ] , <alpha-value>? ] ) <hsl()> = hsl( [ <hue> <percentage> <percentage> [ / <alpha-value> ]? ] | [ <hue>, <percentage>, <percentage>, <alpha-value>? ] ) <hsla()> = hsla( [ <hue> <percentage> <percentage> [ / <alpha-value> ]? ] | [ <hue>, <percentage>, <percentage>, <alpha-value>? ] ) where <alpha-value> = <number> | <percentage> <hue> = <number> | <angle>

HTML内容

<div> <p class="exampleText">Example text</p> </div>

CSS内容

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

规格

SpecificationStatusComment
CSS Logical Properties Level 1The definition of 'border-block-start-color' in that specification.Editor's DraftInitial definition

浏览器兼容性

FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic supportNo support41.0 (41.0)1No supportNo supportNo support

FeatureAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic supportNo support41.0 (41.0)1No supportNo supportNo support