start CSS animation on page load -
this question has answer here:
- css3 transition animation on load? 8 answers
is possible initiate css animation on pageload. works hover, focus , active states. animation causes item bob want happen automatically , constantly.
the css follows:
@-webkit-keyframes hvr-bob { 0% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } 50% { -webkit-transform: translatey(-4px); transform: translatey(-4px); } 100% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } } @keyframes hvr-bob { 0% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } 50% { -webkit-transform: translatey(-4px); transform: translatey(-4px); } 100% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } } @-webkit-keyframes hvr-bob-float { 100% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } } @keyframes hvr-bob-float { 100% { -webkit-transform: translatey(-8px); transform: translatey(-8px); } } .hvr-bob { display: inline-block; vertical-align: middle; -webkit-transform: translatez(0); transform: translatez(0); box-shadow: 0 0 1px rgba(0, 0, 0, 0); -webkit-backface-visibility: hidden; backface-visibility: hidden; -moz-osx-font-smoothing: grayscale; } .hvr-bob:before, .hvr-bob:focus, .hvr-bob:active { -webkit-animation-name: hvr-bob-float, hvr-bob; animation-name: hvr-bob-float, hvr-bob; -webkit-animation-duration: .3s, 1.5s; animation-duration: .3s, 1.5s; -webkit-animation-delay: 0s, .3s; animation-delay: 0s, .3s; -webkit-animation-timing-function: ease-out, ease-in-out; animation-timing-function: ease-out, ease-in-out; -webkit-animation-iteration-count: 1, infinite; animation-iteration-count: 1, infinite; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; -webkit-animation-direction: normal, alternate; animation-direction: normal, alternate; }
Comments
Post a Comment