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

  
Article Provenance: 小方
Article Tags: CSS
评论: 4 | 查看次数: 3718     
  • 1
Wesker [2010-01-12 02:27 PM]
无所谓,反正规整点就好
steven_qiang [2009-10-28 02:22 PM]
习惯了横式书写
comesoft [2009-10-28 09:24 AM]
支持横式,代码明了,但还是要注意点细节这样才能体现它最大优点
chb850222 [2009-10-27 11:55 AM]
我喜欢用横式,页面占用少,不用来回拖动
  • 1
发表评论
你没有权限发表留言!