http://davidsimonperry.com/1400.html
This is my Problem.
Background to rotate to draw the eye and entice you to click on the green and red ball.
Click on the green and red ball to grow.
Click on the green and red ball to shrink.
I do not want the green and red ball to spin.
If I remove the animation from the class=“spinner” the green and red ball falls behind the class=“bg”
z-index has no effect.
If I take the animation away on the class=“spinner” it falls behind the class=“bg”
HTML if I move the class=“spinner” on top of the class=“bg” the the green and red ball falls behind the class=“bg”
Any thoughts would be appreciated.
<!-- Border --><!-- Border --><!-- Border -->
<div id=“border”>
<input type=“checkbox” id=“form-01” />
<label for=“form-01” class=“ball-01”>
<div class=“circle”>
<div class=“bg”>
</div>
<div class=“spinner”>
<img src=“images/pics/P&S.png” width=“100%” alt=""/>
</div>
</div>
</label>
</div>
/– Border –//– Border –//– Border –/
#border {
display: flex;
justify-content: center;
padding: 0px 0px 0px 0px;
margin: 100px 0px 100px 0px;
}
.circle{
transition: all 1.0s;
}
.bg{
background: linear-gradient(to right, #fff, #000);
border-radius: 50%;
width: 100px;
height: 100px;
padding: 10px 10px 10px 10px;
margin: 0px 0px 0px 0px;
animation: animate-cw 5s linear infinite;
}
.spinner{
width: 100px;
height: 100px;
padding: 10px 10px 10px 10px;
margin: -120px 0px 0px 0px;
animation: animate-ccw 9s linear infinite;
z-index: 1;
}
input[type=checkbox]{
display: none;
}
label{
display: flex;
justify-content: space-around;
height: 100%;
width: 100%;
cursor: pointer;
z-index: 3;
}
input[type=checkbox]:checked ~ .ball-01 > .circle{
transform: scale(4);
transition: 2.0s ease;
}
/– @keyframes –//– @keyframes –/
@keyframes animate-cw{
0%{
transform: rotate(0deg);
}
100%{
transform: rotate(360deg);
}
}@keyframes animate-ccw{
0%{
transform: rotate(-0deg);
}
100%{
transform: rotate(-360deg);
}
}