CSS整体书写步骤
1:CSS RESET 重置
2:CSS GLABAL 全局属性
3: CSS分模块属性,(先写默认样式和设计图相差最大的部分,先大块布局,后细致调整)
<style>
/*CSS RESET 重置*/
*{margin:0;padding:0;list-style:none;}
img{border:none;}
/*CSS GLOBAL 全局*/
body{color:#336699; font:14px Arial,'Microsoft Yahei';}
a{color:#ccc;text-decoration:none;}
a:hover{color:#f00;text-decoration:underline;}
h2{font-weight:normal;font-size:20px;}
h3{font-weight:normal;font-size:18px;}
/*此清除浮动用于浮动元素父级,解决高度塌陷问题*/
.clearfix:after{content:"\200B";display:block;height:0;clear:both;}
.clearfix{*zoom:1;}/*IE/7/6*/
/*CSS MODEL*/
/*header*/
#header{}
#header #header-top{}
#header #header-top .left{}
#header #header-top .left li{}
#header #header-top .left li a{}
#header #header-bottom{}
/*another model....*/
</style>
原标题:css书写步骤
关键词:CSS