-webkit-padding-start: 40px;
适用于 Chrome
IE 和 Firefox 有什么用?
最佳答案
对于 Firefox,属性名称是 -moz-padding-start
.对于 IE,没有对应的(到目前为止)。
至少在页面整体为从左到右或从右到左的布局和书写方向的简单场景中,您可以使用广泛支持的 CSS 功能实现相同的效果。使用 <html dir=ltr>
或 <html dir=rtl>
,分别,你可以这样写你的 CSS 代码:
[dir=ltr] .foo {
padding-left: 2.5em;
}
[dir=rtl] .foo {
padding-right: 2.5em;
}
这对应于 .foo { padding-start: 2.5em; }
.当然,这种方法意味着一些代码重复。但它几乎可以 100% 工作(包括 IE 7 和标准模式下的更新版本)。
关于html - -webkit-填充-开始 : 40px; What it should be for IE and Firefox?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12549591/