border-inline-start CSS 特性为 shorthand property for setting the individual logical inline-start border property values in a single place in the style sheet.

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

组成特性

此特性是下列 CSS 特性的简写:

句法

border-inline-start: 1px;
border-inline-start: 2px dotted;
border-inline-start: medium dashed green;
					

The physical border to which border-inline-start maps depends on the element's writing mode, directionality, and text orientation. It corresponds to the border-top , border-right , border-bottom ,或 border-left property depending on the values defined for writing-mode , direction ,和 text-orientation .

Related properties are border-block-start , border-block-end ,和 border-inline-end , which define the other borders of the element.

border-inline-start is specified with one or more of the following, in any order:

<'border-width'>
The width of the border. See border-width .
<'border-style'>
The line style of the border. See border-style .
<'color'>
The color of the border. See color .

形式定义

初始值 as each of the properties of the shorthand:
适用于 所有元素
继承 no
计算值 as each of the properties of the shorthand:
动画类型 as each of the properties of the shorthand:

形式句法

<'border-top-width'> || <'border-top-style'> || <'color'>

where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>

where
<rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )
<rgba()> = rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )
<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )
<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <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-rl;
  border-inline-start: 5px dashed blue;
}
					

规范

规范 状态 注释
CSS Logical Properties and Values Level 1
The definition of 'border-inline-start' in that specification.
编者草案 初始定义

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
border-inline-start Chrome 完整支持 69 Edge 完整支持 79 Firefox 完整支持 41
完整支持 41
完整支持 38 Disabled
Disabled ). To change preferences in Firefox, visit
IE 不支持 No Opera 完整支持 56 Safari 完整支持 12.1 WebView Android 完整支持 69 Chrome Android 完整支持 69 Firefox Android 完整支持 41
完整支持 41
完整支持 38 Disabled
Disabled ). To change preferences in Firefox, visit
Opera Android 完整支持 48 Safari iOS 完整支持 12.2 Samsung Internet Android 完整支持 10.0

图例

完整支持

完整支持

不支持

不支持

用户必须明确启用此特征。

用户必须明确启用此特征。

另请参阅

元数据

  • 最后修改: