-webkit-padding-start: 40px; What it should be for IE and Firefox?

穿精又带淫゛_ 提交于 2019-12-29 05:04:12

问题


-webkit-padding-start: 40px; for Chrome

What it is for IE and Firefox?


回答1:


For Firefox, the property name is -moz-padding-start. For IE, there is no counterpart (so far).

You can achieve the same effect using widely supported CSS features at least in a simple scenario where the page as a whole is either in left-to-right or in right-to-left layout and writing direction. Using <html dir=ltr> or <html dir=rtl>, respectively, you can write your CSS code like this:

[dir=ltr] .foo {
   padding-left: 2.5em;
}
[dir=rtl] .foo {
   padding-right: 2.5em;
}

This would correspond to .foo { padding-start: 2.5em; }. Of course, this approach means some duplication of code. But it works on almost 100% (including IE 7 and newer in Standad Mode).




回答2:


-moz-padding-start: 40px;
-webkit-padding-start: 40px;
-khtml-padding-start: 40px;
-o-padding-start: 40px;
padding-start: 40px;
padding: 40px;

I do not believe IE has a padding-start equivalent.



来源:https://stackoverflow.com/questions/12549591/webkit-padding-start-40px-what-it-should-be-for-ie-and-firefox

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