css - How to stop css3 animation at the end? -
im playing around css3 translatey , i'm not abel stop animation @ end.
html:
<ul id="nav" class="nav-ctn"> <li><a href="?type=about">about</a></li> <li><a href="?type=projects">projects</a></li> <li><a href="?type=media">media</a></li> <li><a href="?type=schedule">schedule</a></li> <li><a href="?type=contact">contact</a></li> </ul>
css:
.tr-up { -moz-animation: tr-up 0.5s ease-in-out; -o-animation: tr-up 0.5s ease-in-out; -webkit-animation: tr-up 0.5s ease-in-out; animation: tr-up 0.5s ease-in-out; -moz-animation-fill-mode: forwards; -o-animation-fill-mode: forwards; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; } @-moz-keyframes tr-up { { -moz-transform: translatey(0); -ms-transform: translatey(0); -o-transform: translatey(0); -webkit-transform: translatey(0); transform: translatey(0); } { -moz-transform: translatey(-3px); -ms-transform: translatey(-3px); -o-transform: translatey(-3px); -webkit-transform: translatey(-3px); transform: translatey(-3px); } } @-webkit-keyframes tr-up { { -moz-transform: translatey(0); -ms-transform: translatey(0); -o-transform: translatey(0); -webkit-transform: translatey(0); transform: translatey(0); } { -moz-transform: translatey(-3px); -ms-transform: translatey(-3px); -o-transform: translatey(-3px); -webkit-transform: translatey(-3px); transform: translatey(-3px); } } @keyframes tr-up { { -moz-transform: translatey(0); -ms-transform: translatey(0); -o-transform: translatey(0); -webkit-transform: translatey(0); transform: translatey(0); } { -moz-transform: translatey(-3px); -ms-transform: translatey(-3px); -o-transform: translatey(-3px); -webkit-transform: translatey(-3px); transform: translatey(-3px); } }
so far have tried solution form following posts:
stopping css3 keyframes animation
stopping css3 animation on last frame
but non of them worked me. doing wrong?
note: tr-up
class dynamically added link characters.
animations shouldn't work on inline elements need change default display property of <span>
tags span{display:inline-block;}
:
if want keep underline on menu items, need add text-decoration:underline;
span tags :
Comments
Post a Comment