时间线

My Life My Style

CSS Hack

div#test           {height:20px; /*For Firefox*/}
div#test           {*height:25px; /*For IE7 & IE6*/}
div#test           {_height:20px; /*For IE6*/}

——还可以如下这般—————————————

div#test             {height:20px;}  /*-for ff-*/
* html div#test  {height:25px;}  /*-for ie6-*/
*+html div#test {height:20px;}  /*-for ie7-*/

号称CSS2.0能最大限度的解决目前面临的很多浏览器兼容问题,但是如果浏览器支持不够那我们也没办法,目前对各主流浏览器(Firefox、IE7/6)兼容的CSS写法出现了如上这些新的写法,但是怎么写方便就个人习惯列,自己选吧哈。

发表评论

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Connecting to %s

加关注

Get every new post delivered to your Inbox.