From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/css_functions/index.html | 257 +++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 files/zh-cn/web/css/css_functions/index.html (limited to 'files/zh-cn/web/css/css_functions') diff --git a/files/zh-cn/web/css/css_functions/index.html b/files/zh-cn/web/css/css_functions/index.html new file mode 100644 index 0000000000..f5f1b38000 --- /dev/null +++ b/files/zh-cn/web/css/css_functions/index.html @@ -0,0 +1,257 @@ +--- +title: CSS Functional Notation +slug: Web/CSS/CSS_Functions +tags: + - CSS Function + - CSS 函数 + - attr() + - calc() + - minmax() + - var() +translation_of: Web/CSS/CSS_Functions +--- +
{{CSSRef}}
+ +

CSS 功能符号是一种 CSS 值,可以表示更复杂的数据类型或调用特殊的数据处理或计算。

+ +

句法

+ +
selector {
+  property: functional-notation( [argument]? [, argument]! );
+}
+ +

The syntax starts with the name of the functional notation, followed by a left parenthesis (. Next up are the notation argument(s), and the function is finished off with a closing parenthesis ).

+ +

Functions can take multiple arguments, which are formatted similarly to CSS property values. Whitespace is allowed, but they are optional inside the parentheses. In some functional notations multiple arguments are separated by commas, while others use spaces.

+ +

索引

+ +

Functional notation defined by a set of CSS specifications includes the following:

+ +
A + + +B + + +C + + +D + + +E + + +F + + +G + + +H + + +I + + +L + + +M + + +O + + +P + + +R + + +S + + +T + + +U + + +V + + +
+ +

规范

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName("CSS4 Values")}}{{Spec2("CSS4 Values")}}Adds toggle(), attr(), calc(), min(), max(), clamp(), round(), mod(), rem(), mod(), sin(), cos(), tan(), asin(), acos(), atan(), atan2(), pow(), sqrt(), hypot(), log(), exp(), abs() and sign() functional notation.
{{SpecName("CSS3 Values")}}{{Spec2("CSS3 Values")}}Adds calc() functional notation.
{{SpecName("CSS4 Colors")}}{{Spec2("CSS4 Colors")}}Adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functional notation.
+ Allows alpha values in rgb() and hsl(), turning rgba() and hsla() into (deprecated) aliases for them.
+ Adds hwb(), device-cmyk(), and color() functions.
{{SpecName("CSS3 Colors")}}{{Spec2("CSS3 Colors")}}Adds rgba(), hsl(), hsla() functional notation.
{{SpecName("CSS4 Images")}}{{Spec2("CSS4 Images")}}Adds element(), image(), image-set() and conic-gradient() functional notation.
+ +

也可以看看

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