jquery - make a div animated with a wobble effect -
description :
i have styled div
calendar. whenever update in calendar date, appears on screen.
now trying animate div
wobble effect follows:
1) tilt left
2) tilt right
3) tilt left
4) etc
so far unsure if should using jquery/css animation.
if point me in right direction, appreciative!
here's jsfiddle of think you're looking for:
this doesn't use jscript, css: (please note. values can changed suit
@-webkit-keyframes wiggle { 0% {-webkit-transform: rotatez(2deg);} 50% {-webkit-transform: rotatez(-2deg);} 100% {-webkit-transform: rotatez(2deg);} } @-moz-keyframes wiggle { 0% {-moz-transform: rotatez(2deg);} 50% {-moz-transform: rotatez(-2deg);} 100% {-moz-transform: rotatez(2deg);} } @-o-keyframes wiggle { 0% {-o-transform: rotatez(2deg);} 50% {-o-transform: rotatez(-2deg);} 100% {-o-transform: rotatez(2deg);} } @keyframes wiggle { 0% {transform: rotatez(2deg);} 50% {transform: rotatez(-2deg);} 100% {transform: rotatez(2deg);} } .test { background-color: red; -webkit-animation: wiggle 0.2s ease infinite; -moz-animation: wiggle 0.2s ease infinite; -o-animation: wiggle 0.2s ease infinite; animation: wiggle 0.2s ease infinite; }
Comments
Post a Comment