michaelmcgurk michaelmcgurk - 2 months ago 17
CSS Question

IE Fallback for Hover animation

I am trying to put together a fallback in Internet Explorer for hovering over an element.

In Chrome, the element

pops
and looks neat but not in IE :(

Currently there is a time delay before the background colour appears.

I'm guessing
-webkit-animation-name
is the root of my issue.

http://jsfiddle.net/8j249sre/

<div class="effects">
<a class="hvr-pop" href="#">Pop</a>
</div>


/* Pop */
@-webkit-keyframes hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}

@keyframes hvr-pop {
50% {
-webkit-transform: scale(1.2);
transform: scale(1.2);
}
}

.hvr-pop {
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-pop:hover, .hvr-pop:focus, .hvr-pop:active {
-webkit-animation-name: hvr-pop;
animation-name: hvr-pop;
-webkit-animation-duration: 0.3s;
animation-duration: 0.3s;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
-webkit-animation-iteration-count: 1;
animation-iteration-count: 1;
}

Answer

Adding this to my .hvr-pop:hover, .hvr-pop:focus, .hvr-pop:active { resolved my issue :-)

-ms-animation-name:none;