专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »Html教程 » xhtmlcss:xhtml+css网页布局是否要注意CSS书写顺序? »正文

xhtmlcss:xhtml+css网页布局是否要注意CSS书写顺序?

来源: 发布时间:星期五, 2008年9月26日 浏览:34次 评论:0
  我们运用xhtml+css网页布局,实现表现与结构的分离,表现部分的css文件非常重要,也比较繁杂,我们在书写CSS文件时有很多属性和值,我们就考虑到了书写顺序的问题。
  有时候是先写了margin或color,然后再写width和height等等。我们有没有必要让我们的编码更加的工整,更加的科学呢?实践证明,书写工整、按一定的规则进行书写是很有好处的。
  下面是MozillaFirefox所建议的CSS书写顺序,对我们的代码书写很有参考价值:

\"div Example Source Code [www.52css.com]
*mozilla.orgBaseStyles
*maintainedbyfantasai
*(classesdefinedintheMarkupGuide-http://mozilla.org/contribute/writing/markup)
*/
/*Suggestedorder:
//显示属性
*display
*list-style
*position
*float
*clear
//自身属性
*width
*height
*margin
*padding
*border
*background
//文本属性
*color
*font
*text-decoration
*text-align
*vertical-align
*white-space
*othertext
*content

  

相关文章

读者评论

  • 共0条 分0页

发表评论

  • 昵称:
  • 内容: