最近、iOSのウィグル効果を模倣することを目的としたものを作成し、jQueryの並べ替え可能機能に加えて使用できるようにしました。コレクションの並べ替え機能を強化するために使用したtastemakerx.comでライブで見ることができます。
これが私が始めたフィドルです:http:
//jsfiddle.net/jozecuervo/fv8vR/
そしてこれがCSSです:
@-webkit-keyframes shake {
0%, 100% {-webkit-transform: translateX(0) rotate(0deg) translateY(0);}
15%, 35%, 55%, 75%, 95% {-webkit-transform: translateX(-1px) rotate(-2deg) ;}
25%, 45%, 65%, 85% {-webkit-transform: translateX(1px) rotate(2deg); }
10%, 30%, 50%, 70%, 90% {-webkit-transform: translateY(1px);}
20%, 40%, 60%, 80% {-webkit-transform: translateY(-1px); }
}
@-moz-keyframes shake {
0%, 100% {-moz-transform: translateX(0) rotate(0deg) translateY(0);}
15%, 35%, 55%, 75%, 95% {-moz-transform: translateX(-1px) rotate(-2deg) ;}
25%, 45%, 65%, 85% {-moz-transform: translateX(1px) rotate(2deg); }
10%, 30%, 50%, 70%, 90% {-moz-transform: translateY(1px);}
20%, 40%, 60%, 80% {-moz-transform: translateY(-1px); }
}
@-o-keyframes shake {
0%, 100% {-o-transform: translateX(0) rotate(0deg) translateY(0);}
15%, 35%, 55%, 75%, 95% {-o-transform: translateX(-1px) rotate(-2deg) ;}
25%, 45%, 65%, 85% {-o-transform: translateX(1px) rotate(2deg); }
10%, 30%, 50%, 70%, 90% {-o-transform: translateY(1px);}
20%, 40%, 60%, 80% {-o-transform: translateY(-1px); }
}
@keyframes shake {
0%, 100% {transform: translateX(0) rotate(0deg) translateY(0);}
15%, 35%, 55%, 75%, 95% {transform: translateX(-1px) rotate(-2deg) ;}
25%, 45%, 65%, 85% {transform: translateX(1px) rotate(2deg); }
10%, 30%, 50%, 70%, 90% {transform: translateY(1px);}
20%, 40%, 60%, 80% {transform: translateY(-1px); }
}
.shake {
-webkit-animation-name: shake;
-moz-animation-name: shake;
-o-animation-name: shake;
animation-name: shake;
-webkit-animation-duration: 2s;
-moz-animation-duration: 2s;
-o-animation-duration: 2s;
animation-duration: 2s;
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-o-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-transition-timing-function:linear;
}