line-height、background-clip、deg、

2016-12-31  本文已影响5人  jlnbda3488375

line-height
行与行之间的距离,不可以为负值;

line-height:200%;


background-clip
分别按照表框盒、内边距框和内容框对背景进行裁剪;
一般要有padding等不为0时才能看到效果

background-clip: border-box|padding-box|content-box;


deg
degree角度


background的简便写法

body{
background: #9933ee url('pic/green.png') repeat fixed left top;
}


样式权值

CSS选择器 权值
标签选择器 1
类选择器 10
ID选择器 100
內联样式 1000
伪元素(first-child) 1
伪类(link等) 10

透明度的设置
其中filter是为了IE浏览器准备的,防止个别浏览器因为版本的问题不能识别opacity;

xx{
opacity: 0.5;
filter: alpha(opacity(50));
}

如果在父标签里设置透明度,会连带影响子标签下的字体等,解决办法:

rgba(x,x,x,x)


上一篇 下一篇

猜你喜欢

热点阅读