我试图在显示或隐藏类为 .socialmenu 的 DIV 时显示转换。这是 CSS 代码,但它不起作用:
.socialmenu {
bottom: 0;
left: 0;
right: 0;
height: 30px;
background: #333;
position: fixed;
display: none;
transition: 3s all ease;
}
这是 JSFiddle与完整的代码。我不介意过渡/动画是否也可以使用 jQuery 实现。有帮助吗?
最佳答案
使用淡入淡出();消退();而不是隐藏();展示(); 同时从 .socialmenu 类中删除过渡效果
关于javascript - 显示/隐藏 div 时的过渡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47739488/