*选取第几个子元素 从前面数*
*nth-child(n) 全部的n是整数从1开始*
*nth-child(3n)*
*nth-child(2n)*
*nth-child(2n+1)*
}复制代码
x:水平方向偏移 正:右边 负值:左边
y:垂直方向偏移 正:下边 负值:上边
a:模糊半径
b:延伸半径
c:颜色
i:inset 设置内阴影复制代码
border-radius:50px 70px 60px/80px 90px 70px;
border-top-left-radius: 30px 40px;
半圆
椭圆复制代码
stretch 拉伸 默认值
round 平铺
repeat 复制复制代码
.border-image-btn{
display: inline-block;
border: 18px solid green;
border-width:0 18px ;
border-image: url(../img/button_sprite.png) 0 18 50 18;
text-decoration: none;
padding: 13px 10px 17px;
color: #fff;
font-size: 16px;
font-weight:bold;
line-height: 15px;
margin: 10px;
}
.border-image-btn:hover{
border-image: url(../img/button_sprite.png) 50 18 0 18;
text-decoration: none;
}复制代码
顾上不顾下,顾左不顾右,只要超出边框就能够
web
###背景图片的字体
webkit-background-clip: text;
-webkit-text-fill-color: transparent;bash
###background-sizeide
.box{
width: 240px;
font-size: 25px;
line-height: 1.5;
text-align: center;
border:20px solid rgba(104,104,142,.5);
padding: 60px 40px;
border-radius:10px ;
color: #f36;
background: url(../img/bg-tl.png) no-repeat top left,
url(../img/bg-tr.png) no-repeat top right,
url(../img/bg-br.png) no-repeat bottom right,
url(../img/bg-bl.png) no-repeat bottom left,
url(../img/bg-repeat.png) repeat left top;
background-origin: border-box,border-box,border-box,border-box,padding-box;
}复制代码
.text-wrap{
background-color: #665757;
width: 600px;
margin: 15px auto;
padding: 10px 0;
border: 5px solid #ccc;
position: relative;
font-size: 50px;
color: #f7edf7;
clear: both;
text-align: center;
letter-spacing: 5px;
box-shadow: 0 0 0 rgb(188,178,188),
1px 1px 0 rgb(173,163,173),
2px 2px 0 rgb(157,147,157),
3px 3px 0 rgb(142,132,142),
4px 4px 0 rgb(126,116,126),
5px 5px 0 rgb(111,101,111),
6px 6px 5px rgba(0,0,0,0.4);
}
.text2{
text-shadow: 0 0 0 rgb(188,178,188),
1px -1px 0 rgb(173,163,173),
2px -2px 0 rgb(157,147,157),
3px -3px 0 rgb(142,132,142),
4px -4px 0 rgb(126,116,126),
5px -5px 0 rgb(111,101,111),
6px -6px 0 rgb(95,85,95),
7px -7px 0 rgb(79,69,79),
8px -8px 7px rgba(0,0,0,.2),
8px -8px 1px rgba(0,0,0,.5),
0px 0px 7px rgba(0,0,0,.3);
}
.text1:active{
box-shadow: 0 0 0 rgb(188,178,188),
1px 1px 0 rgb(173,163,173);
top:14px;
}复制代码
.btn-bevel{
border: none;
border-radius: 4px;
padding: 10px 25px 12px;
font-family: arial,helvetica,sans-serif;
font-size: 13px;
color: #fff;
text-decoration: none;
text-align: center;
display: inline-block;
margin: 10px;
cursor: pointer;
text-shadow: 0 1px 1px rgba(0,0,0,0.4);
background: rgb(120,107,201);
background: -webkit-linear- gradient
(top,rgba(120,107,201,1),
rgba(120,107,201,0.8),
rgba(120,107,201,0.5),
rgba(120,107,201,0.3));
box-shadow: rgba(120,107,201,0.5) 1px 6px 0,
rgba(0,0,0,0.3) 1px 10px 3px;
}
.btn-bevel:active{
position: relative;
top:5px;
box-shadow: rgba(120,107,201,0.7) 0px 1px 3px;
}
.btn{
border: none;
outline: none;
display: inline-block;
width: 80px;
height: 80px;
border-radius:50% ;
margin-right: 90px;
font-size: 0;
background: #e982ab;
box-shadow:0 1px 5px rgba(255,255,255,0.5) inset,
0 -2px 5px rgba(0,0,0,0.5) inset,
0 3px 8px rgba(0,0,0,0.8);
background: -webkit-radial-gradient
(closest-corner circle at top,#f28fb8,#e982ab,#ec568c);
}
.btn:hover:after{
color: #fff;
text-shadow:0 1px 20px #fccdda,1px 0px 15px #fccdda ;
}
.btn:active{
box-shadow:0 2px 2px rgba(0,0,0,0.5) inset,
0 -3px 10px rgba(0,0,0,0.1) inset,
0 2px 4px rgba(255,255,255,0.8);
background: -webkit-radial-gradient
(closest-corner circle at bottom,
#f28fb8,#e982ab,#ec568c);
}复制代码
rgb(0-255红,0-255绿,0-255蓝)
rgba(0-255红,0-255绿,0-255蓝,opacity)
HSL(H色调,S饱和度,L亮度)
HSLa(H色调,S饱和度,L亮度,opacity)
HSL色彩模式 是工业界的一种颜色标准
Hue:色调 0(360)红色 60黄色 120绿色 180天蓝色 240blue 300紫红色
中间能够随意取值来表明其余颜色
Saturation(饱和度) 0%-100%
Lightness(亮度) 0%-100%复制代码
translate(x,y) 若是你传了一个就是translateX(x)
translateX(x)
translateY(y)复制代码
scale(n) n:(0-1) 缩小 > 1表示放大
scaleX(nX)
scaleY(ny)复制代码
rotate(deg)复制代码
skew(xdeg,ydeg) 若是传一个值表明 skewX(xdeg)
skewX(xdeg)
skewY(ydeg)复制代码
transition: opacity 2s 1s ease-out ;
ease:渐渐慢
linear:匀速直线运动
ease-in:由慢变快
ease-out:由快变慢
ease-in-out:由慢变快再变慢 复制代码
transform-style: preserve-3d;
translateZ
rotateX,rotateY,rotateZ
rotate3d()复制代码