gpt4 book ai didi

jquery - 悬停时 div 在其他 div 上滑动

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

我有一组id为“side-panel-options”的div

enter image description here

我想要的效果是

enter image description here

我曾尝试以“绝对”、“相对”、“静态”等各种可能的逻辑方式调整位置,但无济于事。

我现在的CSS是

#side-panel-option
{
background: rgba(209,209,209,1);
height : 75px;
width : 150px;
margin-top : 5px;
z-index : 0;
}

#side-panel-option:hover
{
background: rgba(209,209,209,1);
height : 100px;
width : 200px;
position : static;
margin-top : 5px;
z-index : 10;
}

请建议我应该尝试什么。

最佳答案

尝试缩放:

.wrapper {
position: absolute;
right: 0px;
top: 0px;
}

.wrapper .item {
background: rgba(209,209,209,1);
height : 75px;
width : 150px;
margin-top : 5px;
transform-origin: 100% 50%;
-webkit-transform-origin: 100% 50%;
box-shadow: 0px 0px 7px #000;
}

.wrapper .item:hover {
transform: scale(1.5);
-webkit-transform: scale(1.5);
}
<div class="wrapper">
<div class="item">A</div>
<div class="item">B</div>
<div class="item">C</div>
<div class="item">D</div>
<div class="item">E</div>
</div>

关于jquery - 悬停时 div 在其他 div 上滑动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27943632/

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