我绝对将元素定位在 float div 中。在我们调整窗口大小之前,最后一个绝对定位的元素会粘在 chrome 中 div 的顶部(请参阅 here )
到目前为止我尝试过的事情:
- 将容器放入 float 元素中
- 溢出:隐藏/自动到 float 、元素和容器
这只发生在 chrome 中。知道为什么/发生了什么吗?
最佳答案
只有您需要做的小事,其他一切都很棒。用这个
.schedule-course-slot-wrapper {
position: absolute; /*Important*/
border: thin solid;
border-radius: 3px;
margin: 0 2px;
padding: 0 3px;
height: 100%;
}
代替
.schedule-course-slot-wrapper {
position: relative; /*Important*/
border: thin solid;
border-radius: 3px;
margin: 0 2px;
padding: 0 3px;
height: 100%;
}
关于html - 奇怪的位置绝对 chrome 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15874571/