gpt4 book ai didi

CSS3 过渡最大高度 : 0 to max-height : 99999px

转载 作者:太空宇宙 更新时间:2023-11-04 13:37:59 24 4
gpt4 key购买 nike

你好

我正在尝试使用纯 css3 制作相应的标签,我知道转换不适用于 height : 0height : auto 所以我尝试使用 max-height : 0max-height : 99999px 。但我不知道为什么不起作用。

JSFiddle

最佳答案

试试这个 one .

您必须定位一个属性。如果你使用 all 这个词,您定位所有媒体资源。 Read about it on MDN .

div {
transition: <property> <duration> <timing-function> <delay>;
}

示例:

.ac-container article {
-webkit-transition: 5s all;
-moz-transition: 5s all;
-o-transition: 5s all;
-ms-transition: 5s all;
transition: 5s all;
}

另一个错误,你忘记了一个;在:

.ac-container input:checked ~ article{
max-height:999999px !important /* ; */
}

最后一件事,

如果您使用较大的值(如 999999px )和较小的过渡(如 0.5s ),过渡可能有效但您看不到它。

顺便说一下,您不需要关键字 !important在这里。

关于CSS3 过渡最大高度 : 0 to max-height : 99999px,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22894097/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com