想知道为什么定位 div 以保持响应如此困难.. 它们出于某种原因只是 float 在他们想要的地方.. 我怎样才能完美地定位它们?在像我的社交图标一样调整大小时保持他们的位置http://www.closetvip.com/splash.html
/* Menu Buttons */
#english {
float:right;
position:absolute;
right:570px;
bottom:101px;
clear:right;
}
#spanish {
position:absolute;
left:570px;
bottom:100px;
clear:right;
}
<div id="spanish">
<img src="img/espanol.png">
</div>
<div id="english">
<img src="img/english.png">
</div>
最佳答案
您需要在绝对 div 的父 div 上使用 position: relative;
否则元素是窗口的绝对值
关于css - 在 bootstrap 中定位 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17628235/