ie6不支持两个连续并列class类名怎么解决

建站知识 2021-07-03 08:43www.168986.cn长沙网站建设
代码如下:
HTML code:

复制代码
代码如下:

<!doctype html>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
.i1 { font-size:21px; }
.i2 { font-size:121px; }
.i1.on { color:red; }
.i2.on { color:blue; }
</style>
</head>
<body>
<span class="i1 on">我的颜色 有问题?</span>
<span class="i2">我是垫背的</span>
</body>
</html>

在ff中是红色,没问题,这就是想要的效果,但是在ie6中却是蓝色,求解,不改变结构,有办法解决吗?
解决的完解代码如下:
HTML code:

复制代码
代码如下:

<!doctype html>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
.i1 { font-size:21px; }
.i2 { font-size:121px; }
.i1 .on { color:red; }
.i2 .on { color:blue; }
</style>
</head>
<body>
<span class="i1"><span class="on">我的颜色 有问题?</span></span>
<span class="i2"><span class="on">我是垫背的</span></span>
</body>
</html>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by