background-position-x (background-position-y) 是标准的 W3C CSS 属性吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9653685/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 03:14:20  来源:igfitidea点击:

Is background-position-x (background-position-y) a standard W3C CSS property?

cssbackground-position

提问by Guile

I'm worried about background-position-xand background-position-y. Gecko (Firefox) and Presto (Opera) don't support them, but Webkit (Chrome, Safari) does...

我很担心background-position-xbackground-position-y。Gecko (Firefox) 和 Presto (Opera) 不支持它们,但 Webkit (Chrome, Safari) 支持...

Does anyone know (with official references) if this is (or will be) included in the standard?

有谁知道(有官方参考)这是否(或将)包含在标准中?

采纳答案by Razor

background-position-xand background-position-yare now part of the level 4 of Backgrounds and Borders standard.

background-position-x并且background-position-y现在是背景和边框标准 4 级的一部分。

RESOLVED: background-position-x/-y, background-repeat-x/-y approved for level 4 of backgrounds and borders.

已解决:background-position-x/-y、background-repeat-x/-y 已批准用于第 4 级背景和边框。

回答by Gumbo

Splitting background-positioninto -xand -ywas proposed for CSS 3but it got rejected as the working group “considered the use case too weak to introduce new properties for.” Additionally, there seemed to be some ambiguity concernswith multiple background imagesand CSSOM, the API behind CSS. I'm not sure how WebKit and Trident did implement them and how they addressed these concerns.

拆分background-position-x-y提出了CSS 3,但它得到了拒绝,因为工作组“考虑到用例太弱,为引进新的属性。” 此外,似乎有一些不确定性的担忧多背景图片CSSOM,背后CSS的API。我不确定 WebKit 和 Trident 是如何实现它们的,以及它们是如何解决这些问题的。

The CSS WG blob has just reportedyesterday that there will be “no change to background-positionor transform-originsyntaxes.” The reason is probably due to not getting any further delays.

CSS工作组的blob刚刚报道昨日,会有“没有变化background-positiontransform-origin语法”。原因可能是因为没有进一步的延迟。

Maybe it will get added to CSS 4. There is a current thread on the [email protected] mailing listthat you might find interesting.

也许它会被添加到 CSS 4 中[email protected] 邮件列表上有一个您可能会感兴趣的当前主题



Update????So apparently these properties have been approved for CSS 4 (see [CSSWG] Minutes Telecon 2014-04-16):

更新????显然这些属性已被批准用于 CSS 4(参见[CSSWG] Minutes Telecon 2014-04-16):

RESOLVED: background-position-x/-y, background-repeat-x/-yapproved for level 4 of backgrounds and borders.

已解决:background-position-x/ -y, background-repeat-x/-y批准用于 4 级背景和边框。

回答by shabunc

I guess in some sense you've already answered your own question. No, both background-position-x and background-position-y are nonstandard.

我想在某种意义上你已经回答了你自己的问题。不,background-position-x 和 background-position-y 都是非标准的。