I'm using a flip card CSS3 animation to flip one div that contains a card image and icons to the opposite side, which contains another card image and icons.
The problem I've been having is that when the page is viewed in Google Chrome, whenever the back side of the div is shown, the left hand side of the displayed div seems to bleed the elements from the opposite side. As a result, when the icon on the left hand side is clicked, in reality the icon in the same position on the reverse face is what's clicked.
I've constructed a JS Fiddle to illustrate the problem, and also to show that it's just Google Chrome this issue occurs in. After the card has been flipped once, clicking the left icon activated the icon on the other side of the card. The right hand icon is unaffected no matter which way the card is flipped.
Here's the JSFiddle here: https://jsfiddle.net/Gavmastaphlex/a48cxdhm/76/
If anyone can help that would be much appreciated!
HTML
<div class="flip-card flip-back">
<div class="flip-card-inner">
<div class="flip-card-front">
<img id="helpImage" class="cardIcon" src="https://gavmcgz.github.io/img/question.png" />
<img id="removeCard" class="cardIcon" src="https://gavmcgz.github.io/img/minus.png" alt="" />
<img class="cardImage" src="https://gavmcgz.github.io/games/orleans/img/cards/1-1.jpg" alt="">
</div>
<div class="flip-card-back">
<img id="helpImage" class="cardIcon" src="https://gavmcgz.github.io/img/question.png" />
<img id="removeCard" class="cardIcon" src="https://gavmcgz.github.io/img/minus.png" alt="" />
<img class="cardImage" src="https://gavmcgz.github.io/games/orleans/img/cards/1-2.jpg" alt="">
</div>
</div>
</div>
CSS
.flip-card {
background-color: transparent;
perspective: 1000px; /* Remove this if you don't want the 3D effect */
margin: 0 auto;
}
.flip-card, .flip-card .cardImage {
width: 300px;
height: 417px;
}
/* This container is needed to position the front and back side */
.flip-card-inner {
position: relative;
width: 100%;
height: 100%;
text-align: center;
overflow: visible !important;
transition: transform 0.8s;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
transform-style: preserve-3d;
box-shadow: 0px 0px 10px #AAA;
}
/* Position the front and back side */
.flip-card-front, .flip-card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
}
/* Style the front side (fallback if image is missing) */
.flip-card-front {
color: black;
}
/* Style the back side */
.flip-card-back {
color: white;
transform: rotateY(180deg);
}
.cardIcon {
display:block;
position: absolute;
top: 0;
width: 50px;
cursor:pointer;
cursor:hand;
}
#helpImage {
left:0;
}
#removeCard {
right:0;
}