*選取第幾個子元素 從前面數*
*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()複製代碼