</head>
<body>
<div class="top">
<span class="fl">fl</span>
</div>
<br />
<span class="fl">fl</span>
</body>
</html>
效果如图,第一个span是包含在div里的(div 的class为top),为了能看清楚,加了红色的背景 。可以看出,红色部分正好是页面宽度的28%(371px/1366px约等于28%) 。而第二个,没有包含在div里的span,没有红色背景,显然是不受.top .fl {width:28%; text-align:left;background-color:red;}影响 。。。当然咯,你自己测试的时候可以加上.top{***********},体会体会 。。。不懂的话,追问咯 ^_^
7.Css的样式怎写.zt1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 30px;
text-indent: 20px;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: none;
background-color: #EBEBEB;
}
8.请问,如何用CSS做一个如图这样的日历既然是日历的话,那么就不DIV了,直接table,代码就是下面的……<style>table,td{border:1px solid #ddd;border-collapse:collapse;}td{width:35px;height:15px;text-align:center;line-height:15px;}.imp{background-color:yellow;}.sun{color:red;}</style><body>SUNMONTUEWEBTHUFRISAT12345678910111213141516171819202122232425262728293031
