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

别来无恙 提交于 2019-11-26 02:24:13

问题


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

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


回答1:


background-position-x and background-position-y are now part of the level 4 of Backgrounds and Borders standard.

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




回答2:


Splitting background-position into -x and -y was proposed for CSS 3 but 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 concerns with multiple background images and CSSOM, the API behind CSS. I’m not sure how WebKit and Trident did implement them and how they addressed these concerns.

The CSS WG blob has just reported yesterday that there will be “no change to background-position or transform-origin syntaxes.” The reason is probably due to not getting any further delays.

Maybe it will get added to CSS 4. There is a current thread on the www-style@w3.org mailing list that you might find interesting.


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

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




回答3:


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



来源:https://stackoverflow.com/questions/9653685/is-background-position-x-background-position-y-a-standard-w3c-css-property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!