-
html:结构
-
css:样式
-
js:行为 html:主要是标签(语义)
-
div(division分割):本身语义为分割,比如将整个网页分成导航,内容区域(侧边栏 轮播图)foot区域
-
span:可将div分割成的导航内左右区域等进一步划分成小区域
-
a:语义为超链接
-
h2:<h2>aaaa</h2>,浏览器可直接将aaa文本渲染成大.黑.粗字体,这就是h2的语义
-
css:层叠样式表,定义网页效果
-
页面布局(大的模块用浮动,小的用定位,父相子绝)
-
1.实现元素并排:浮动 float:left right; 注:浮动就会出现问题
.clearfix:after{
visibility: hidden;/3.*隐藏盒子,但是会占位置(所以还会影响页面布局,设置height: 0就好了);display:none(隐藏后不占位置)
相当于visibility: hidden + height: 0呈现的效果,因为已有display: block,所以无法同时呈现display:none*/
content: '.';
clear: both;/*1.清除左右侧对自己的影响*/
display: block;/*2.转成块级*/
height: 0;
}
display:none(隐藏后不占位置)相当于visibility: hidden + height: 0呈现的效果,因为已有display: block,所以无法同时呈现display:none