transition过滤

transition过渡;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
1. transition margin :
a {
transition: margin .2s;/* 指定margin过渡2秒 */
/*transition:all .2s; 指定所有过渡2秒 */
}

2. transition hover放大1.5倍:scale(1.5)
.icon-close{
@include positionImg(absolute,23px,25px,14px,14px,'/imgs/icon-close.png');
transition: transform .3s;
&:hover{
transform: scale(1.5);
}
}

3.
transition: all 0.3s ease-out;

4.
transition: all 0.3s linear 0s;

5.
transition: all 0.3s linear;

6.
transition:all 0.3s ease-in-out;

7.背景过渡
transition: background-color 0.3s linear;

8.背景渐变
background: linear-gradient(top, #a9db80 0%, #96c56f 100%);

边框背景字颜色都延迟3秒:transition: border-color 0.3s, background-color 0.3s, color 0.3s;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

.form-submit {
width: 100px;
border: 2px solid #999;
text-align: center;
line-height: 55px;
height: 55px;
cursor: pointer;
transition: border-color 0.3s, background-color 0.3s, color 0.3s;
}

.form-submit:hover,
.form-submit:focus {
color: #fff;
border-color: #bf0000;
background-color: #bf0000;
}