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