<!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>
<title></title>
<style type="text/css">
.\31 2u, .\31 2u\24 {
width: 100%;
clear: none;
margin-left: 0;
}
.\32 u, .\32 u\24 {
width: 16.6666666667%;
clear: none;
margin-left: 0;
background:red;
}
.\31 u, .\31 u\24 {
width: 8.3333333333%;
clear: none;
margin-left: 0;
background: blue;
}
</style>
</head>
<body>
<div class="2u" >test</div>
<div class="1u" >tes55t</div>
<div class="\32">yyyy</div>
</body>
</html>
上面这个可以有效果,但是我把那个3换成其他数字就没有效果了,请知道的老师解释一下是什么原因造成的
如换成8或5:
<!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>
<title></title>
<style type="text/css">
.\81 2u, .\81 2u\24 {
width: 100%;
clear: none;
margin-left: 0;
}
.\82 u, .\82 u\24 {
width: 16.6666666667%;
clear: none;
margin-left: 0;
background:red;
}
.\81 u, .\81 u\24 {
width: 8.3333333333%;
clear: none;
margin-left: 0;
background: blue;
}
</style>
</head>
<body>
<div class="2u" >test</div>
<div class="1u" >tes55t</div>
<div class="\82">yyyy</div>
</body>
</html>
效果如:
没有颜色效果了