ITeye博客

几种 css hack 方法

deng131 · 2012-10-31 22:38 · stylesheet · Web前端 · Markdown

第一种:!important方式 .DIV{
background:orange;/ff/
*background:green!important;/IE7/
*background:blue;/IE6/
}

第二种:样式属性前缀式 .DIV{
margin:10px;/ff/
*margin:15px;/IE7/
_margin:15px;/IE6/
}

第三种:选择前缀式 #DIV{color:#333;}/ff/
*html#DIV{color:#666;}/IE6/
*+html#DIV{color:#999;}/IE7/

第四种:IE条件式

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。