Bootstrap 3:我试图将一个按钮中心浮动到面板页脚的中间.但是整个布局都是响应式的,所以我需要在屏幕尺寸调整大小时使用它,或者它仍然是正确的.我创建了一个bootply,我的尝试很接近,但是在屏幕调整大小时不会停留.谢谢,Nate
Bootply试用版
这是你想要的吗?http://www.bootply.com/114327
.relative { position: relative; } .absolute { position: absolute; } .bottom-btn { left: 50%; bottom: -17px; /* half of the button height */ margin-left: -77px; /* half of the button width */ /* instead of bottom and margin-left, you can use translateX as well. */ }
玩css position
属性并margin
用来获得准确的位置.看到.bottom-btn
班级的评论.