It's difficult for me to articulate this using words, so here is a gif demonstration:
The p
element represents the <p>
tag that becomes visible when its display property is changed to block in JavaScript (by default it's set to none).
As a result of this change, the h1
element shifts slightly upwards. (although in this example it's just one line, typically it's more)
What approach should I take to animate the upward movement of the h1 element?