开发者

Apple UK website CSS, *padding-top:0; What does this mean?

#content { padding-top: 13px; *padding-top: 0; }

View Source

My Question is, what 开发者_开发问答does the * do in this example?

It's from the source code on apple.com/uk website


My Question is, what does the * do in this example?

It is a CSS hack used to target IE6 and IE7.

#content {
    padding-top: 13px; /* for standard-compliant browsers */
    *padding-top: 0; /* for IE6 and IE7 */
}

Note: It is bad idea to go for CSS hacks. The better approach to target IE is to use IE conditional comments.


It's a hack to serve IE, which improperly parses it, padding-top of 0.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜