1.透明度;
filter:alpha(opacity=50)//滤镜(支持ie8及更早的版本),取值为(0-100)%,如果值越大,透明度越低;
opacity:0.5;
2.设置圆角边框---(ie9)
-webkit-/-moz-
border-radius:5px;//5%;
border-top-left-radius:150px;//上左边的圆角;
-webkit-border-radius:5%;
-moz-border-radius:5%;
3.盒阴影
-webkit-;
-moz-;
-o-;
书写格式:box-shadow:水平偏移量 垂直偏移量 模糊距离 阴影尺寸 颜色 inset/outset;
京东右边的固定条的代码:
.fixed box{
position:fixed;
top:0;
bottom:0;
right:0;
width:100px;
background:blue;
box-shadow:0px 0px 10px 10px ;
-moz-box-shadow:0px 0px 10px 10px ;
-webkit-box-shadow:0px 0px 10px 10px;
-o-box-shadow:0px 0px 10px 10px;
}
4.2d转换--ie9
-webkit-
-moz-
-o-
-ms-;
要用transform的效果,作用对象的css设置 transition:all 3s linear;
然后在hover里面设置转换的属性;
transform:
translate(x,y) 沿着x和y轴移动,在初始位置上的左上角开始偏移;
translatex(n)/translatey(n);
scale(width,height)改变元素的宽度和高度;
scale(n)宽度和高度都是以n的倍数进行放大或缩小;
rotate(deg)规定元素旋转多少度,以顺时针的方向旋转;
skew(x-deg,y-deg)沿着x和y轴倾斜;
.div{
width:200px;
height:200px;
background:red;
transition:all 3s linear;
}
.div:hover{
transform:scale(.5)//往里面缩小0.5倍;
transform:rotate(30deg);//旋转30度;
transform:translate(20px,10px);
transform: skew(30deg, 30deg);沿着x轴和y轴倾斜;
}