CSS animation with different transition off :hover -
i'm working css animations i'm trying div bounce out when hovered on (change opacity: 0;
1). however, when mouse hovers want fade opacity original value of 0. far have:
@-webkit-keyframes bouncey { 0% { opacity:0; -webkit-transform: scale(1); } 50% { opacity: 1; -webkit-transform: scale(1.1); } 100% { -webkit-transform: scale(1); } } .box { width: 200px; height: 200px; background: red; opacity: 0; } .box:hover { opacity: 1; -webkit-animation: bouncey 1s ease-in-out; }
this applies bounce out animation when hovered over, i'm unsure how make div fade 0 on mouseleave. add -webkit-transition: opacity 1s;
somewhere help?
i prefer css / non js/jquery solution if it's possible.
.box{ -webkit-transition: opacity 0.5s ease-in-out; } .box:hover { -webkit-transition: none; }
transition happens on blur
hope helps :)
Comments
Post a Comment