开发者

Different margin for webkit browsers

There is difference between webkit and the other browsers in one absolute positioned element margin.

So how to set another margin for the webkit browsers in the css?

Tha开发者_高级运维nks!


Sometimes these problems can be avoided with experience by structuring your surrounding markup and CSS differently, but if that doesn't work or isn't possible in this instance you can use the following CSS hack:

/* CSS properties for all browsers */
#yourObject { position: absolute; left: XXXpx; top: YYYpx; }

/* CSS overrides for webkit browsers: Safari 3+, Chrome 1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
 #yourObject  { left: LLLpx; top: TTTpx;  }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜