问题描述
我需要第一个按钮来重叠它下面的所有其他项目。然而,这些元素不应该被“钉住”。由于这些项目在一个 flex 项目中,当 flex 项目调整大小时, flex-wrap 应该可以工作。
按钮拉伸时怎么不拉伸?
在此先感谢您的帮助!
#c{
display: flex;
flex-direction: column;
align-items: flex-start;
}
.uInput *{
align-self: center;
}
.uInput #dropdown{
max-height: 0px;
overflow: hidden;
margin: 0px;
}
.uInput:focus #dropdown{
max-height: 1000px;
transition: max-height 0.6s ease-in;
}
<div id="c">
<button class="uInput">
<img src="#">
<p id="lable">SOMETHING</p>
<div id="dropdown">
<p>Item</p>
<p>Item</p>
</div>
</button>
<button class="uInput">
<img src="#">
<p id="lable">SOMETHING</p>
<div id="dropdown">
<p>Item</p>
<p>Item</p>
</div>
</button>
</div>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)