3 ms·
For anyone wishing to CSS transition height from 0 to auto (or other way round), you can do it with max-height and achieve the same outcome, i.e. max-height: 0p
by nchuhoai 14y ago
For anyone wishing to CSS transition height from 0 to auto (or other way round), you can do it with max-height and achieve the same outcome, i.e. max-height: 0px to max-height: 9999px
- brian_c 14y agoThis is useful in a pinch, but transitioning a 100px high element from max-height 9999px to 0 means there's going to be a huge delay while it's transitioning between 9999px and 100px followed by a very fast transition between 100px and 0, which is usually worse than having no transition at all.
- nchuhoai 14y agoi mean if you know the approximate/upper limit of the height, you can minimize that delay.