CSS样式

1.长度单位

                    1)font-style:italic(斜体);normal(正常);oblique(强行斜体,不常用)

                      2)font-weight:lighter(偏细);bold(加粗);normal(正常)

                        3)大小:font-size:1~单位用px

                          4)行高:line-height:1~px,也可用百分比来表示

                             5)字体:font-family:"常用三种字体,微软雅黑,宋体,黑体"(可写两三个字体用逗号隔开)

2.文本属性

                      1)文本首行缩进:text-indent:1px;

                       2)对齐方式:text-align:right;left;center;justify

                         3)文本描述:text-decoration:line-through(删除)underline(下划线)overline(上划线)none(取消下划线)

                         4)阴影:text-shadow:px空格px空格px空格red;

                           5)字间距:letter-spacing:px;

                             6)词间距:word-spacing:px;

                               7)大小写:text-transform:uppercase(大写);capitalize(单词首字母大写);lowercase(小写)

                                 8)空白显示:white-space:pre;normal;nowrap(强行占一行显示)

3.样式表

                             1)list-style-type:"可加样式"

                              2)list-style-image:"URL"可设图片格式

                               3)鼠标设置样式:cursor:pointer(手型) text(文本)wait(等待)help(帮助)crosshair(十字键头)

                                4)背景:background-image:URL();    background-repeat(重复):repeat-X(X轴重复)repeat-Y(Y轴重复)no-repeat(不重复)   background-size:x轴(100%)y轴(50%)可设置图片大小  background-position(位置):top right(右上);bottom(下)background-attachment:fixed将背景图像固定住

                                   5)滤镜:filter:1)blur(模糊px)要加前缀可显示

                                                          ie:trident内核前缀:-ms-

                                                          firefox:gecko内核前缀:-moz-

                                                          google safiri:webkit:-webkit-

                                                           presto(欧朋):-o-

                                                           2)底色和饱和度invert

                                                             3)透明度opacity(0~100%) 

                                                               4)灰度grayscale(0~100%)

                      

    

       

原文地址:https://www.cnblogs.com/waitingforbb/p/5794853.html