Change html svg cricle's fill with css when clicked on

Viewed 566

I am using the following svg drawing as a button:

<svg id="button-more-people" style="width: 60px; height: 60px;">
    <circle cx="30" cy="30" r="30" fill="#F44336" id="circle-button-more-people"/>
    <text fill="#ffffff" font-size="45" x="11" y="44" font-family="Verdana">+</text>
</svg>

When the mouse hovers over the circle, I scale the button up through css:

#button {
    transition: 0.3s ease;
}

#button:hover {
    transform: scale(1.2);   
}

What I can't seem to achieve is to change the buttons color when its clicked on. I have tried the following, to no avail:

#button:active ~ circle {
    fill: #D50000;
}

I would prefer if there was a javascript-less solution to this I could use.

Thanks for any help in advance!

1 Answers
Related