J
J
jyweta2021-11-19 16:52:05
css
jyweta, 2021-11-19 16:52:05

How to fill the background of the parent element from the center of the button in an animated way?

<div class='containerCard'>
<div class='buttonFiller'>Кнопка</div>
</div>


Hey! There is a containerCard card. Just a div with rounded edges, a border and a shadow. He has a button, let it be a burger. How to make it so that when you click on this burger button, the card is filled with the color of the button FROM the center point of this burger? As if when you click on it, a hypothetical bucket of paint drops under it. Not just the background color of the parent changed, but from some point it animatedly flooded.

6197abb1a3f75125779841.png

I googled something, the animations themselves do not seem to cause difficulties, they are caused by logic. In this example, the link fills the button, but it is itself, not the parent element.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question