CSS代码编写用“横式”还是“纵式”?

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;}

Tags(标签):CSS

文章评论
 专题推荐
     栏目更新
    站点导航

    天天网摘 Copyright(版权所有) © 天天网摘 2001~2009

    本站文章来源于网络,如果有侵犯你的权宜的地方,请指出我们会即时更正。

    Free Web Hosting