CSS权值

4.1        ID:100       标签选择器:1        类选择器伪类:10       通配符:0       行类:1000

4.2     !important  声明高  例:ul li.li1{color:red !important;}

4.3:    font-size绝对单位 (不会因为浏览器分辨率改变而改变)   in    cm    mm    pt    pc        xx-small    x-small    small    medium     large     x-large    xx- large     

   相对单位   em   %     em是父元素的倍数例:<p style="font-size="50px;"><span  style="font-size="2em;" >123<></p>   123字体的大小会变成100px     

   %也是同样的原理  例:<p style="font-size="10px;"><span  style="font-size="150%;" >123<></p>    123字体的大小会变成10px 乘以150%  等于15px

4.4   font-weight  属性   normal---默认  bold--加粗(常用  相当于700)   bolder---跟粗   lighter---更细(相当于400)    100~900    

4.5   font-style  斜体   属性   normal---默认  italic---斜体  oblique---倾斜     

4.5   font-variant  字体变形  针对英文 属性   normal---默认    small-caps(小型大写字母)   

4.6   font  属性简写    font-style   font-variant    font-weight    font-size/line-light    font-family   (font-style   font-variant    font-weight 必须要在size和family前面,size和family顺序不可以颠倒)

4.7   vertical-align 垂直对齐  只对行类元素和单元格有效  属性   baseline  sub---下标  super---上标  top  text-top  middle bottom  text-bottom 长度  百分比

*垂直居中     父元素添加display:table;       子元素添加display:table-cell; text-align-center;    多行垂直居中

4.8    word-spacing  单词间距     letter-spacing   字母之间的间距

4.9   text-tranform   属性  capitalize--正常显示   uppercase--所有字母大写   lowercase---首字母大写  none

4.10  text-decoration:  属性  underline---下划线   overline---上划线    line-through---贯穿线   blink---文字闪烁效果   none

4.11

posted @ 2018-09-11 20:21  键1234  阅读(135)  评论(0编辑  收藏  举报