JSFiddle - React, Tailwind, and code Playground
HTML
<figure class="picture">
<img class="picture__img" src="https://source.unsplash.com/IFxjDdqK_0U/900x600" alt="котэ">
<div class="picture__dots">
<div class="picture__dot picture__dot--ear-1"></div>
<div class="picture__dot picture__dot--ear-2"></div>
<div class="picture__dot picture__dot--nose"></div>
</div>
</figure>
CSS
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
}
.picture {
position: relative;
margin: 0;
}
.picture__img {
width: 100%;
display: block;
}
.picture__dots {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.picture__dot {
position: absolute;
top: 0;
left: 0;
cursor: pointer;
background-color: rgb(253, 9, 26);
border: 3px solid rgb(255, 255, 255);
width: 14px;
height: 14px;
border-radius: 50%;
z-index: 1;
}
.picture__dot::before {
content: '';
position: absolute;
border: 1px solid rgb(253, 9, 26);
background-color: rgba(255, 255, 255, 0);
top: -150%;
left: -150%;
height: 400%;
width: 400%;
border-radius: 50%;
animation: pulsar_pulsate 2s ease-out infinite;
opacity: 0;
}
.picture__dot--ear-1 {
left: 43%;
top: 15%;
}
.picture__dot--ear-2 {
left: 72%;
top: 10%;
}
.picture__dot--nose {
left: 46%;
top: 42%;
}
@keyframes pulsar_pulsate {
0% {
transform: scale(0, 0);
opacity: 0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1, 1);
opacity: 0;
}
}