html - 奇怪的位置绝对 chrome 错误

标签 html css google-chrome css-position

我绝对将元素定位在 float div 中。在我们调整窗口大小之前,最后一个绝对定位的元素会粘在 chrome 中 div 的顶部(请参阅 here )

到目前为止我尝试过的事情:

  • 将容器放入 float 元素中
  • 溢出:隐藏/自动到 float 、元素和容器

这只发生在 chrome 中。知道为什么/发生了什么吗?

enter image description here

最佳答案

只有您需要做的小事,其他一切都很棒。用这个

.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/

相关文章:

html - 页脚中的内容是非交互式的(无法突出显示、单击链接等)

javascript - 更改 F5 按钮的行为

jquery - 单击交互式 map (SVG + jQuery)

html - 将选中的复选框从勾号更改为纯色背景色

html - 具有相同高度的 Flex 盒子内部元素

CSS 在页面底部显示第 1 页,共 10 页

html - 代码看起来很乱;请问有没有更好的办法

html - 使用 HTTP Post Request 上传文件

html - 为什么 Chrome 不使用元刷新重定向

html - 为什么在加载某些网页时 Chrome 图标会短暂闪烁?