X 归档 2024-05-20
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.
.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.
在 CSS 中让 height 从 0 动画到 auto!不错。
.item {
height: 0;
}
.item.is-active {
height: calc-size(auto);
}
不太清楚为什么是 calc-size() 而不是 calc(),也许这个新函数还有一些我不知道的其他用途。
.item {
height: 0;
}
.item.is-active {
height: calc-size(auto);
}
不太清楚为什么是 calc-size() 而不是 calc(),也许这个新函数还有一些我不知道的其他用途。
