When I hover over 4 divs, their background color changes. Now, I want to click on each of them to change the color of a circle inside an SVG tag. Below are my codes:
#a1,
#a2,
#a3,
#a4 {
display: inline-block;
position: relative;
border: 2px solid black;
width: 100px;
height: 100px;
}
#a1:hover {
background-color: orangered;
}
#a2:hover {
background-color: green;
}
#a3:hover {
background-color: blue;
}
#a4:hover {
background-color: yellow;
}
<div style="width:25%; margin:auto; text-align:center;">
<div id="a1"></div>
<div id="a2"></div>
<div id="a3"></div>
<div id="a4"></div>
</div>
<svg id="b" height="100" width="100">
<circle cx="50" cy="50" r="40" />
</svg>
Is it possible to achieve this using only CSS without JavaScript or JQuery?