具体代码:
具体代码:
css代码:
.colorful > a:hover {
-webkit-animation:infinite 2s ease-in-out start-roll;
-moz-animation:infinite 2s ease-in-out start-roll;
animation:infinite 2s ease-in-out start-roll;
}
@-webkit-keyframes start-roll{
0% {
-webkit-transform: rotate(0deg); /chrome/
-moz-transform: rotate(0deg); /火狐/
-ms-transform: rotate(0deg); /IE/
transform: rotate(0deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
zoom:1;
}
50% {
-webkit-transform: rotate(180deg); /chrome/
-moz-transform: rotate(180deg); /火狐/
-ms-transform: rotate(180deg); /IE/
transform: rotate(180deg);
-webkit-transition: opacity 1s linear;
transition: opacity 1s linear;
opacity: 1;
filter: alpha(opacity=100);
zoom:2;
}
100% {
-webkit-transform: rotate(360deg); /chrome/
-moz-transform: rotate(360deg); /火狐/
-ms-transform: rotate(360deg); /IE/
transform: rotate(360deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
zoom:1;
}
}
@-moz-keyframes start-roll{
0% {
-webkit-transform: rotate(0deg); /chrome/
-moz-transform: rotate(0deg); /火狐/
-ms-transform: rotate(0deg); /IE/
transform: rotate(0deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
}
50% {
-webkit-transform: rotate(180deg); /chrome/
-moz-transform: rotate(180deg); /火狐/
-ms-transform: rotate(180deg); /IE/
transform: rotate(180deg);
-webkit-transition: opacity 1s linear;
transition: opacity 1s linear;
opacity: .5;
filter: alpha(opacity=50);
}
100% {
-webkit-transform: rotate(360deg); /chrome/
-moz-transform: rotate(360deg); /火狐/
-ms-transform: rotate(360deg); /IE/
transform: rotate(360deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
}
}
@keyframes start-roll{
0% {
-webkit-transform: rotate(0deg); /chrome/
-moz-transform: rotate(0deg); /火狐/
-ms-transform: rotate(0deg); /IE/
transform: rotate(0deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
}
50% {
-webkit-transform: rotate(180deg); /chrome/
-moz-transform: rotate(180deg); /火狐/
-ms-transform: rotate(180deg); /IE/
transform: rotate(180deg);
-webkit-transition: opacity 1s linear;
transition: opacity 1s linear;
opacity: .5;
filter: alpha(opacity=50);
}
100% {
-webkit-transform: rotate(360deg); /chrome/
-moz-transform: rotate(360deg); /火狐/
-ms-transform: rotate(360deg); /IE/
transform: rotate(360deg);
-webkit-transition: opacity .3s linear;
transition: opacity .3s linear;
opacity: .5;
filter: alpha(opacity=50);
}
}
js代码:
希望本文所述对大家学习javascript程序设计有所帮助。
原文链接:https://www.f2er.com/js/50903.html