css基础

css是美化html的存在。

首先需要用选择器

分为id、class、标签、*

优先级是id>class>标签>*

美化样式的属性:

1.背景background属性

2.字体font、text属性(color 字体颜色)下划线

3.边框 表外间距(margin)、表内间距(padding)上左下右

4.列表方块list-stlye none去掉表前序号; inside点在里面;outside点在外面

list-style-image将序号变为图片

5.格式布局,位置,绝对位置(absolute)相对于浏览器的定位,相对位置(relative)相对于图片自身的定位

对上边的距离(top)对左边的距离(left)对右边的距离(right)对下边的距离(bottom)

6.流float left向左流 float right向右流 clear both清掉流

z-index分层,值越大越靠上。

7.常用的标签 display block/none(显示/隐藏)不占位置visibility visible/hidden(占位置的显示隐藏)

overfiow hidden(超出部分隐藏)

 

posted @ 2018-03-19 16:31  k丶灵  阅读(82)  评论(0)    收藏  举报