Is there an elegant, some kind of an easy way to switch the circle's background with the div's background under them?
I want the circles to apply the div "one" image background, but the div "one" to be invisible(not the visibility:hidden ofc).
I don't need to hardcore the heck out of it, I want an elegant/sort of an easy way to make this.
IE10/11 support and above.
.one {
position: relative;
width: 500px;
height: 300px;
background-image: url("https://ak5.picdn.net/shutterstock/videos/11223065/thumb/1.jpg");
}
.two,
.three {
position: absolute;
top: 50%;
transform: translate(0%, -50%);
left: 15px;
width: 100px;
height: 100px;
border-radius: 50%;
background: #fff;
}
.three {
left: initial;
right: 15px;
}
<div class="one">
<div class="two"></div>
<div class="three"></div>
</div>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…