当前位置: 主页 > 网页制作 > CSS > CSS代码编写的"横式""纵式"

CSS代码编写的"横式""纵式"

时间:2009-12-8来源:互联网 点击:
 CSS代码编写用“横式”还是“纵式”?不知道大家有没有考虑过这个问题。横式其最大的优点就是可以大幅度地减少代码占用页面的高度,在修改css时不必拉着滚动条上下看,但纵式更加清晰,但合理规范一下横式也可以使代码清晰。如属性之间空格,排列属性分先后。

div css xhtml xml Example Source Code Example Source Code [www.52css.com]
body { margin:0 auto; font-size: 12px; color:#555555; background:#64748B;}
ul,li{ margin:0; pading:0; list-style:none;}
.clear{ clear:both;}
a { color: #555; text-decoration:none;}    
a:hover { color: #364d6f; text-decoration:underline;}    
a:visited { color: #364d6f;}
img{border:0;}
   
div css xhtml xml Example Source Code Example Source Code [www.52css.com]
#mainBox{ width:1002px; height:auto;  margin:0 auto; overflow:hidden; background:#ccffcc;}
#headerBox{ width:1002px; height:100%; text-align:center; overflow:hidden; background:#ccc;}
#midBox{ width:1002px; height:100%; padding-left:100px;overflow:hidden; background:#FFF;}
#footerBox{ width:1002px; height:100%; text-align:center; overflow:hidden; background:#ccc;}
站长资讯网
. TAG: CSS 编写
推荐内容最近更新人气排行
关于我们 | 友情链接 | 网址推荐 | 常用资讯 | 网站地图 | RSS | 留言