Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS-“;Return";过渡不起作用_Html_Css_Css Transitions - Fatal编程技术网

Html CSS-“;Return";过渡不起作用

Html CSS-“;Return";过渡不起作用,html,css,css-transitions,Html,Css,Css Transitions,我试图在元素的max height属性上添加一个CSS转换,使它看起来像是打开和关闭的。 它在打开部分正常工作,但当我试图关闭它时,它只是跳过了转换 我尝试将“transition:max height.5s ease in”行应用到元素的打开状态和关闭状态,但它没有改变任何事情。 我还尝试转换height属性,但它也没有改变任何东西 这是演示,尝试屏幕宽度低于992px:(点击“lire la传记”) 关于它为什么会这样做以及如何修复它,有什么想法吗?:) 好吧,轻松就是原因 在中缓慢过渡,

我试图在元素的max height属性上添加一个CSS转换,使它看起来像是打开和关闭的。 它在打开部分正常工作,但当我试图关闭它时,它只是跳过了转换

我尝试将
“transition:max height.5s ease in”
行应用到元素的打开状态和关闭状态,但它没有改变任何事情。 我还尝试转换height属性,但它也没有改变任何东西

这是演示,尝试屏幕宽度低于992px:(点击“lire la传记”)


关于它为什么会这样做以及如何修复它,有什么想法吗?:)

好吧,
轻松
就是原因

  • 在中缓慢过渡,突然结束=
    ease in
  • 突然开始,缓慢的向外过渡=
    放松
您可能只想使用
ease
ease-in-out


另外,
max height
应该是指定元素中定义的CSS属性。

多亏了@Steve Ventimiglia,我删除了ease in。 由于“最大高度”属性,我在关闭div时仍然存在延迟问题。
我的回答是: 基本上,在结束转换时延迟-0.1秒,在开始转换时延迟0秒。
例如:

#toggled{
    max-height: 0px;
    transition: max-height .8s cubic-bezier(0, 1, 0, 1) -.1s;
}

#trigger:hover + #toggled{
    max-height: 9999px;
    transition-timing-function: cubic-bezier(0.5, 0, 1, 0); 
    transition-delay: 0s; 
}

“Lire la biographie”按钮在哪里?对不起,只是为了更准确地编辑而已!它在992px以下的屏幕上显示!哦,是的,我真傻。非常感谢。我要轻松地进进出出。你知道为什么“退出”过渡会有延迟吗?我没有具体说明。。