<!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="Content-Type" content="text/html; charset=gb2312" />
<title>关于用CSS区分Firefox、IE6、IE7</title>
<style. type="text/css">
#example{color:red ;}/*firefox*/
* html #example{color:blue;}/*ie6*/
*+html #example{color:green;}/*ie7*/
</style>
</head>
<body>
<div id="example">在FireFox下应为红色,在IE6.0下应为蓝色,在IE7.0下应为绿色。</div>
</body>
</html>
用CSS代码来判断浏览器是Firefox、IE6、IE7的网页特效代码
精选 转载文章标签 职场 休闲 CSS 判断 浏览器 文章分类 前端开发
-
兼容ie6/ie7浏览器抖动的头部固定css
以往写过网页头部nav滚动时顶部固定但是在ie6/ie7中会出现先下滚动式,页面在颤抖,
html html5 css js web -
css hacks (ie6,ie7,ie8,firefox,Chrome)
IE6能识别下划线"_"和星号" * ",IE7能识别星号" * ",但不能识别下划线"_",IE8能识别" \9",但不能识别下划线"_",
Chrome Firefox CSS webkit 浏览器 -
IE6、IE7、IE8、Firefox、Opera CS
针对样式名 如果只让ie6看见用*html .head{color:#000;}如果只让ie7看见用*+html .head{color:#0
Opera Firefox CSS 浏览器 Chrome