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).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…