A
A
alaskafx2021-11-12 20:39:32
Vue.js
alaskafx, 2021-11-12 20:39:32

How to make a smooth increase/decrease in height depending on the display of vue content?


Here, for example, pen, how can I make the height of the parent block smoothly increase and decrease when hiding / showing content?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-11-12
@alaskafx

Elementary, I threw those on my knee:

Only it does not take into account a bunch of all sorts of edge-cases, the most obvious: changes in the width in the process of work - you should add another wrapper and ResizeObserver.
But there are also a lot of non-obvious ones, so ready-made libs are usually used for such things.)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question