From 9a110dee28ae2ef12ee014b98fda6bae6ee48edb Mon Sep 17 00:00:00 2001 From: YujiSoftware Date: Wed, 2 Mar 2022 20:22:51 +0900 Subject: Migrate to Compat macro (zh-cn) --- .../web/css/gradient/linear-gradient()/index.html | 167 +-------------------- 1 file changed, 1 insertion(+), 166 deletions(-) (limited to 'files/zh-cn/web/css/gradient/linear-gradient()') diff --git a/files/zh-cn/web/css/gradient/linear-gradient()/index.html b/files/zh-cn/web/css/gradient/linear-gradient()/index.html index 4e1083f3cd..670d14976a 100644 --- a/files/zh-cn/web/css/gradient/linear-gradient()/index.html +++ b/files/zh-cn/web/css/gradient/linear-gradient()/index.html @@ -269,172 +269,7 @@ where <side-or-corner> = [ left | right ] || [ top | bottom ]

浏览器兼容性

-

{{CompatibilityTable}}

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeInternet ExplorerOpera (Presto)Safari
Basic support (on {{cssxref("background")}} and {{cssxref("background-image")}}){{CompatGeckoDesktop("1.9.2")}}{{property_prefix("-moz")}}[1]
- {{CompatGeckoDesktop("16")}}[2]
10.0 (534.16){{property_prefix("-webkit")}}[6]10.0[4]11.10{{property_prefix("-o")}}[1]5.1{{property_prefix("-webkit")}}[6]
On {{cssxref("border-radius")}}{{CompatGeckoDesktop("29")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
On any other property that accepts {{cssxref("<image>")}}{{CompatNo}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
Legacy webkit syntax{{non-standard_inline}}{{CompatNo}}3{{property_prefix("-webkit")}}[3]{{CompatNo}}{{CompatNo}}4.0{{property_prefix("-webkit")}}[3]
Legacy 'from' syntax (without to){{non-standard_inline}}{{CompatGeckoDesktop("1.9.2")}}{{property_prefix("-moz")}}[5]10.0 (534.16){{property_prefix("-webkit")}}[3]1011.10{{property_prefix("-o")}}[5]5.1{{property_prefix("-webkit")}}[3]
Standard syntax (using the to keyword){{CompatGeckoDesktop("16")}}26.0 (537.27)1012.106.1
Interpolation hints (a percent without a color){{CompatGeckoDesktop("36")}}40{{CompatUnknown}}27{{CompatUnknown}}
Unitless 0 for <angle>{{CompatGeckoDesktop("46")}}{{property_prefix("-moz")}}[7]{{CompatVersionUnknown}}Edge 12{{CompatVersionUnknown}}{{CompatVersionUnknown}}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FeatureFirefox (Gecko)ChromeInternet ExplorerOpera (Presto)Safari
Basic support (on {{cssxref("background")}} and {{cssxref("background-image")}}){{CompatGeckoMobile("1.9.2")}}{{property_prefix("-moz")}}[1]
- {{CompatGeckoMobile("16")}}[2]
16{{property_prefix("-webkit")}}
- 26
10{{CompatVersionUnknown}}{{CompatVersionUnknown}}
On {{cssxref("border-radius")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
On any other property that accepts {{cssxref("<image>")}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Legacy webkit syntax{{non-standard_inline}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Legacy 'from' syntax (without to){{non-standard_inline}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Standard syntax (using the to keyword){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
Interpolation hints (a percent without a color){{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}{{CompatUnknown}}
- -

[1] Gecko, Opera & Webkit consider {{cssxref("<angle>")}} to start to the right, instead of the top. I.e. it considered an angle of 0deg as a direction indicator pointing to the right. This is different from the latest specification where an angle of 0deg as a direction indicator points to the top. Since Firefox 42, the prefixed version of gradients can be disabled by setting layout.css.prefixes.gradients to false.

- -

[2] Before Gecko 36.0 {{geckoRelease("36.0")}}, Gecko didn't apply gradients on the pre-multiplied color space, leading to shades of grey unexpectedly appearing when used with transparency.

- -

[3] WebKit since 528 supports the legacy -webkit-gradient(linear,…) function. As of WebKit 534.16, it also supports the standard gradient syntax. Unlike in Gecko, in legacy WebKit you cannot specify both a position and an angle in -webkit-linear-gradient(). You can achieve the same effect by offsetting the color stops.

- -

[4] Internet Explorer 5.5 through 9.0 supports proprietary filter: progid:DXImageTransform.Microsoft.Gradient() filter.

- -

[5] Firefox 3.6 and Opera 11.10 implemented, prefixed, an early syntax where the starting corner or side was indicated without the to keyword, and effectively considered as a 'from' position. The to syntax has been added in Firefox 10 and Opera 11.60.

- -

In addition to the unprefixed support using the standard syntax, Gecko 44.0 {{geckoRelease("44.0")}} added support for a -webkit prefixed version of the function using the legacy 'from' syntax for web compatibility reasons behind the preference layout.css.prefixes.webkit, defaulting to false. Since Gecko 49.0 {{geckoRelease("49.0")}} the preference defaults to true.

- -

[6] Opera & Webkit consider {{cssxref("<angle>")}} to start to the right, instead of the top. I.e. it considered an angle of 0deg as a direction indicator pointing to the right. This is different from the latest specification where an angle of 0deg as a direction indicator points to the top. Since Firefox 42, the prefixed version of gradients can be disabled by setting layout.css.prefixes.gradients to false. WebKit since 528 supports the legacy -webkit-gradient(linear,…) function. As of WebKit 534.16, it also supports the standard gradient syntax. Unlike in Gecko, in legacy WebKit you cannot specify both a position and an angle in -webkit-linear-gradient(). You can achieve the same effect by offsetting the color stops.

- -

[7] linear-gradient(0, pink, teal) equivalent to linear-gradient(0deg, pink, teal),See {{bug("1239153")}}.

+{{Compat("css.types.image.gradient.linear-gradient")}}

了解更多

-- cgit v1.2.3-54-g00ecf