仅 Safari 和 Opera 识别的 Hack;仅 Firefox 3 和 IE7 识别的 Hack。
1、仅 Safari 和 Opera 识别的 Hack
@media all and (min-width: 0px){/* Safari and Opera rules here */}
或者
@media screen and (-webkit-min-device-pixel-ratio:0) {/* Safari and Opera rules here */}
注:这里所指代的 Safari 和 Opera 一般为最新版本。
2、仅 Firefox 3 和 IE7 识别的 Hack
selector, x:-moz-any-link, x:default {/* Firefox 3 and IE7 rules here */}
使用方法例:
在
@media screen and (-webkit-min-device-pixel-ratio:0) {.box{width:100px;}/* Safari and Opera rules here */}
推荐阅读
css实现div在下拉菜单之上
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="C>>>详细阅读
本文标题:CSS Hack(Safari、Opera、Firefox3和IE7)
地址:http://www.17bianji.com/kaifa2/CSS/17087.html
1/2 1