+ -
当前位置:首页 → 问答吧 → IE6对这个问题是怎么解释的?

IE6对这个问题是怎么解释的?

时间:2010-10-28

来源:互联网

如图所示
<style type="text/css"> .mod{ height:100px; width:200px; padding:20px; margin:10px auto; border:1px solid #ccf; font-size:15px;} .txt.mod{ color:red;} .txts.mod{ color:#000} </style> <body > <div class="txt mod">txt</div> <div class="txts mod">txts</div> </body>
 提示:您可以先修改部分代码再运行

附件

1.jpg (6.1 KB)

2010-10-28 15:40

IE6

2.jpg (6.52 KB)

2010-10-28 15:40

FF

作者: jhtiboy   发布时间: 2010-10-28

.txt.mod{ color:red;}

如果,txt是mod的父级
那么就是.txt空格.mod
但是这里不是阿 你直接写.txt不就是了么.

或者这样
<style type="text/css"> .txt,.txts{ height:100px; width:200px; padding:20px; margin:10px auto; border:1px solid #ccf; font-size:15px;} .txt{ color:red;} .txts{ color:#000} </style> <body > <div class="txt">txt</div> <div class="txts">txts</div> </body>
 提示:您可以先修改部分代码再运行
[ 本帖最后由 leilay 于 2010-10-28 17:14 编辑 ]

作者: leilay   发布时间: 2010-10-28