I'm currently having an issue with z-indexes not being recognized on several CSS animations I'm using. Here is the code of one of the problematic animations...
.animal {
.part-0 {
@include animation(animal-movement, 1.5, infinite, linear);
}
}
@keyframes animal-movement {
25% {
transform: rotate(1deg);
}
50% {
transform: translate(2px, -4px) rotate(2deg);
}
75% {
transform: rotate(-1deg);
}
}
@-webkit-keyframes animal-movement {
25% {
-webkit-transform: rotate(1deg);
}
50% {
-webkit-transform: translate(2px, -4px) rotate(2deg);
}
75% {
-webkit-transform: rotate(-1deg);
}
}
.animal {
.part-0 {
width: 60px;
height: 73px;
top: 80px;
left: 0px;
background-position: 0px 0px;
position: absolute;
z-index: 2;
background-image: url(/images/1970-characters-animated.png);
}
}
HTML
<article class='character character-animal animal-movement' style='top:0px; left:1875px;'>
<a class='animal animal-movement' href='/character/1970/patty-jimmy patty-jimmy-movement.html' id='animal animal-movement' style='background-image: url(/images/1970-characters.png); width:272px; height:170px; background-position: 0px -650px;' title='Patty & Jimmy'>
Animal
<span class='part-0'></span>
</a>
</article>
part-0 is a span that has a background image that is animated. The problem I'm having is that part-0 is not recognizing z-indexes of other objects around it. I was wondering if anyone had a workaround to this.