【发布时间】:2018-01-15 18:54:51
【问题描述】:
我总是发现自己对 CSS 中的这个绝对位置感到困惑,问题是当我尝试使用 chrome 和 firefox 时它很好,即使我正在更改浏览器的屏幕尺寸以查看响应行为但屏幕尺寸相同在移动设备上,我的绝对元素向上移动了一些像素。
#square-box-tratamiento-nebulizado {
height:20px;
width:100%;
text-align:-webkit-right;
z-index:1000;
/*margin-top:-63px;*/
position:absolute;
bottom: 61px;
pointer-events: none;
}
/*etiqueta pulverizado*/
#square-box-tratamiento-pulverizado {
height:20px;
width:100%;
text-align:-webkit-right;
z-index:1000;
/*margin-top:-29px;*/
position:absolute;
bottom: 26px;
pointer-events: none;
}
https://jsfiddle.net/x7b8hp9b/
提前致谢
【问题讨论】:
-
您是否尝试使用
top而不是bottom?不是水平滚动条的原因吗? -
@skam 正是因为滚动条我修复了它并写了答案。
标签: html css twitter-bootstrap twitter-bootstrap-3