Ale*_* Jj 5 css hover css3 css-transitions css-animations
我有一个图像,当悬停时它的背景颜色会发生变化.
改变颜色需要1秒钟,但是一旦courser移出图像,它就会变回而没有任何影响.
如何淡出背景颜色?
CSS:
.latestTrack {
margin:80px 0 0 0 !important;
}
.latestTrack img {
float:right;
margin-right:50px !important;
}
.latestTrack img:hover
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
background-color:#f7710f;
}
Run Code Online (Sandbox Code Playgroud)
HTML:
<img src="img/SocIco/soundcloud-large.png" />
Run Code Online (Sandbox Code Playgroud)
dsg*_*fin 14
你忘记了缓和部分:
.latestTrack img {
float:right;
margin-right:50px !important;
-webkit-transition: all 1s ease-out;
-moz-transition: all 1s ease-out;
-o-transition: all 1s ease-out;
-ms-transition: all 1s ease-out;
transition: all 1s ease-out;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
17372 次 |
| 最近记录: |