短评 · ·

X 归档 2024-05-19

1 条动态 · 图 0 · 视频 0
Animate from height: 0 to auto in CSS! Nice one.

.item {
height: 0;
}

.item.is-active {
height: calc-size(auto);
}

Not sure why calc-size() and not calc(), maybe there are other uses for this new function that I'm not aware of. https://t.co/NRElEhyhsA
在 CSS 中让 height 从 0 动画到 auto!不错。

.item {
height: 0;
}

.item.is-active {
height: calc-size(auto);
}

不太清楚为什么是 calc-size() 而不是 calc(),也许这个新函数还有一些我不知道的其他用途。 https://t.co/NRElEhyhsA