gpt4 book ai didi

javascript - 淡入();使用 jQuery 和 CSS3 的盒子元素

转载 作者:行者123 更新时间:2023-11-28 12:15:16 24 4
gpt4 key购买 nike

我有一个关于 jQuery 的问题,显示了一个我想显示为框的元素。-webkit-box/-moz-box 等

但是。如果我在 jQuery 中使用 fadeIn 函数,它会淡入 block 元素吗?我想这是一个常见问题,但我找不到任何可以帮助我的东西。

有什么建议吗?

CSS

.page-wrapper {
min-height: 100%;

display: -webkit-box;
-webkit-box-align: center;
-webkit-box-pack: center;
-webkit-box-orient: vertical;

display: -moz-box;
-moz-box-align: center;
-moz-box-pack: center;
-moz-box-orient: vertical;
}
#open-menu {
position: fixed;
color: #fff;
top: 0px;
left: 0px;
font-size: 2em;
padding: 5px;
}
#page-wrapper-menu {
position: fixed;
width: 100%;
background-color: rgba(0, 0, 0, 0.9);
color: #fff;
text-align: center;
overflow: hidden;
display: none;
}

jQuery 代码

$('#open-menu').click(function(){
$('#page-wrapper-menu').fadeIn();
});
$('#page-wrapper-menu').click(function(){
$('#page-wrapper-menu').fadeOut();
});

最佳答案

here you can achieve fade effect with change in display property of css. inline, or inline-block or block or any other..

$('').animate({display:"inline-block"},500);

关于javascript - 淡入();使用 jQuery 和 CSS3 的盒子元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19220743/

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