gpt4 book ai didi

jquery - 使用 jQuery 制作多个 div 动画

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

<分区>

首先看看这个 fiddle ,到目前为止我做了什么:

https://jsfiddle.net/9wsdgc6x/

<div class="row1">
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>About me</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Gamestack</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Favourites</p>
</div>
</div>
<div class="row2">
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>About me</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Gamestack</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Favourites</p>
</div>
</div>
<div class="row3">
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Feeds</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>About me</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Gamestack</p>
</div>
<div class="dashboard-box">
<span class="glyphicon glyphicon-book" aria-hidden="true"></span>
<p>Favourites</p>
</div>
</div>

CSS:

.dashboard-box{
display: inline-block;
background: rgba(255,255,255,0.1);
vertical-align: middle;
position: relative;
width: 80px;
height: 80px;
border: 1px solid #000000;
}

js:

$(document).ready(function(){
$(".dashboard-box").click(function() {
$(this).siblings(".dashboard-box").animate({left: '100%'}, "slow");
});
});

现在,我想要的是,当我单击一个 div 时,该 div 将放大并占据我窗口的 60%,其余的 div 将在两列中的窗口两侧进行动画处理,左边的一列将包含一半div 和右边的一个将包含 div 的其余部分。然后按 esc 它将回到原来的位置。任何帮助将不胜感激。提前致谢。

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