今天上午主要学习了css 。我个人觉得css与HTML是互补的。二者之间相辅相成。很多HTML无法完成东西都会用到css,个人感觉很新奇因为是头一次接触css
html——结构决定网页结构与内容(是什么)
css——表现样式,决定网页的表现样式(什么样)
本节知识点:
定位的三种形式:1.相对定位 2.绝对定位 .3.固定定位
1.固定定位:设置好位置之后,无论页面何如滚动,其位置保持不变。
position:fixed;
top:left:right:bottom;
2.相对定位:相对元素原来位置进行移动。
position:relative;topleft right bottom
3.绝对定位:
position:absolute;topleft bottom right;
border:给元素增加边框;
4.border:1px solidgray;
border-style:solid;
border-width:1px;
border:gray;
padding:作用在内容区域和边线之间增加距离
5.padding:10px 20px30px 40px;
padding:10px;
padding:0px 10px;
外边距:在元素之间产生空隙;
margin:10px 20px30px 30px;
margin:10px;
padding:0px 10px;
width = 元素内容区域 + 内边距 + 边框;
height默认内容高度,一般不用设置。
text-align:left.center.right;
font-size:0-1000px;
background-color:它的颜色覆盖范围是元素内容区域 + padding + border边框;
border-radius:设置边框圆角;
对于 HTML也进行了复习。