【css】css基本属性

css属性介绍

 1 backgroud-color:blue  or   #000000 or rgb(255,255,255)  --背景颜色
 2 backgroud-image:url(/image/1.gif) --背景图片
 3 background-repeat:repeat-y,repeat-x   --背景重复
 4 background-position:center --背景图像位置
 5 background-attachment:fixed  --图像不随文档滚动
 6 
 7 text-indent:5em --首行缩进,可以被继承
 8 text-align:left,right,center,justify  --文本对齐方式
 9 word-spacing:30px or 5em  --改变字单词之间间隔 em可以是负值
10 letter-spacing:30px  or -0.5em  --改变单词中 字母间间隔
11 text-transform:none or uppercase or lowercase or capitalize  --改变文本大小写
12 text-decoration:none or underline or overline or line-through or blink --文本上划线下划线等
13 color --设置文本颜色
14 direction:ltr  or  rtl  --设置文本方向
15 inline-height   --设置行高
16 text-shadow  --设置文本阴影
17 font-family  --设置文本字体
18 font-style:normal or italic or oblique  --文本斜体
19 font-variant:small-caps  --设置小型大写字母
20 font-weight:normal or bold or 900 --设置文本的粗细
21 font-size:20px or(==) 1.25em or 100% --设置文本大小
22 li列表项中:list-style:url or square none or inside --列表项标志
23 table表格中:table ,th,td :border:1px solid blue(线的大小 实线 颜色)  --表格边框
24 table表格中:border-collapse:collapse   --表格边框折叠为单一边框 
25 table表格中:width,表格元素td宽度高度,td对齐方式text-lign or vertical-align
26 padding:20px  --元素内间距,带有四个方向上右下左
27 margin:20px  --元素间间距,带有四个方向上右下左
28 position:static,relative,absolute,fixed   --定位
29 float:left  --浮动
30 clear:left,right,both,none,inherit  --清除浮动
原文地址:https://www.cnblogs.com/carsonwuu/p/7472734.html