将div元素放在响应背景上(Bootstrap 3)

时间:2014-05-17 17:20:32

标签: css twitter-bootstrap twitter-bootstrap-3 background-image

我想在响应的背景上放置div(输入表单)。

我正在使用Bootstrap 3作为页面模板。但是,如果我调整窗口大小或使用其他屏幕尺寸,则元素位于另一个位置。我该如何解决这个常见问题?

示例:http://goo.gl/D7TwIP enter image description here enter image description here

谢谢!

1 个答案:

答案 0 :(得分:0)

而不是使用margin-top和margin-left,在定位的绝对元素上使用top和left属性。

top: 540px;
left: 117px;
position: absolute;

还要确保将父元素设置为相对位置。

position: relative;