我有两个内联 div,其中一个内联 div 有两个彼此下方的 div。 JSFiddle
点击#notLoginStudentBtn
我在做什么我正在切换#notLoginStudentBox
但在切换#notLoginStudentBtn
之后下降
我面临的另一个问题是 inline-blocked div
我希望两个 div 具有相同的高度,即与最小的 div
和更长的 div
将溢出垂直滚动条。我可以使用 max-height 但两个 div 都会根据元素的数量动态增长和收缩
引用 JSFiddle 链接:https://jsfiddle.net/govi20/vwc20vsz/
最佳答案
删除 display:inline-block 和下面的 css 到这个类:
.table_sorter_container {
position: relative;
float: left;
}
并且您需要将高度设置为 div,例如 height: 165px;并且还需要设置height:165px 和max-height:100%
关于javascript - 切换 div 时 Div 掉落,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45096133/