CSS 1.css介绍 css指的是层叠样式表(cascading style sheets) 官方文档:https://www.w3school.com.cn/css/index.asp为什么需要c
2021-10-21 13:38:52
68
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>
09
2022-11
09
2022-11
09
2022-11
09
2022-11
19
2022-10
19
2022-10