transition过滤

transition过渡;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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: 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;
}