gpt4 book ai didi

javascript - 在javascript中响应

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

我用 jQuery 制作了一个可扩展的 div 所以在我的 css 中 div250px 宽度,当我将其展开为 500px

如何让它响应?我的意思是,当 div 处于“打开”状态时,我想要它以便当用户调整其窗口大小时 div 会随之调整大小,并且当用户单击 open 在它打开的 div 上取决于窗口的尺寸。

这是我的代码:

$('.button').click(function(){

$('.content').animate({width: "500px",}, 500);
setTimeout(function(){
$('.content').animate({top: "-400px", marginBottom: "0px", height:"1000px"}, 500);
},500);

});
.content{
width:250px;
}

http://jsfiddle.net/Tibuakaw/of8znvc5/

最佳答案

.content{
width:50%;
}

调整宽度:)

关于javascript - 在javascript中响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30448702/

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