From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- .../zh-cn/web/css/-webkit-border-before/index.html | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 files/zh-cn/web/css/-webkit-border-before/index.html (limited to 'files/zh-cn/web/css/-webkit-border-before') diff --git a/files/zh-cn/web/css/-webkit-border-before/index.html b/files/zh-cn/web/css/-webkit-border-before/index.html new file mode 100644 index 0000000000..2d0b51372f --- /dev/null +++ b/files/zh-cn/web/css/-webkit-border-before/index.html @@ -0,0 +1,103 @@ +--- +title: '-webkit-border-before' +slug: Web/CSS/-webkit-border-before +tags: + - '-webkit-border-before' + - CSS + - 'CSS:WebKit Extensions' + - CSS属性 + - Reference + - 非标准 +translation_of: Web/CSS/-webkit-border-before +--- +
{{CSSRef}}{{Non-standard_header}}
+ +

-webkit-border-before CSS 属性 是一种用于简写的属性。它用于在样式表的单个位置设置各个起始边框属性值。

+ +
/* Border values */
+-webkit-border-before: 1px;
+-webkit-border-before: 2px dotted;
+-webkit-border-before: medium dashed blue;
+
+/* Global values */
+-webkit-border-before: inherit;
+-webkit-border-before: initial;
+-webkit-border-before: unset;
+
+ +

-webkit-border-before 可以使用以下一个或多个值:

+ +
    +
  1. {{cssxref("-webkit-border-before-width")}}
  2. +
  3. {{cssxref("-webkit-border-before-style")}}
  4. +
  5. {{cssxref("-webkit-border-before-color")}}.
  6. +
+ +

它根据元素的书写模式、方向以及文本方向映射到Border上. 对应到四个边框属性{{cssxref("border-top")}}、{{cssxref("border-right")}}、{{cssxref("border-bottom")}}或{{cssxref("border-left")}} ,具体取决于 {{cssxref("writing-mode")}}、{{cssxref("direction")}}、{{cssxref("text-orientation")}}三个属性定义的值。

+ +

这个属性和 {{cssxref("-webkit-border-after")}}、{{cssxref("-webkit-border-start")}}、{{cssxref("-webkit-border-end")}}三个属性用来定义元素的边界。

+ +

此属性在相关标准上的命名为 {{cssxref("border-block-start")}}.

+ +

{{cssinfo}}

+ +

语法

+ +

可选择的值

+ +

按以下顺序,一个或多个值

+ +
+
<'border-width'>
+
参考 {{cssxref("border-width")}}
+
<'border-style'>
+
参考 {{cssxref("border-style")}}
+
<'color'>
+
参考 {{cssxref("color")}}
+
+ +

Formal syntax

+ +
{{csssyntax}}
+ +

示例

+ +

HTML

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

CSS

+ +
div {
+  background-color: yellow;
+  width: 120px;
+  height: 120px;
+}
+
+.exampleText {
+  writing-mode: vertical-rl;
+  -webkit-border-before: 5px dashed blue;
+}
+ +

{{EmbedLiveSample("Example", 140, 140)}}

+ +

规范

+ +

尽管它和 {{cssxref("border-block-start")}} 属性有关,但现在并不存在与任何一标准规范。

+ +

兼容性

+ + + +

{{Compat("css.properties.-webkit-border-before")}}

+ +

参考

+ + -- cgit v1.2.3-54-g00ecf