【发布时间】:2014-07-17 04:03:21
【问题描述】:
所以我有一个 div,里面有内容,但我想用一个位于其他所有内容之上的图像完全覆盖该内容。
如果有帮助,我正在使用引导程序
<div class="jumbotron">
<div> I have images and paragraphs inside of me </div>
<div> I have images and paragraphs inside of me </div>
<div class="clearfix"></div>
</div>
我尝试为 jumbotron 设置背景图像,但这会将图像放在其他所有内容的后面,而不是在顶部。我尝试了其他一些方法,但一切都搞乱了应该存在于覆盖图像下方的现有布局。
【问题讨论】:
-
喜欢上述 div 的样式
background-image,还是您想隐藏 DIV 的内容? -
请问您为什么想要那里的内容但不可见?
-
如果您希望图像位于顶部,则应使用带有 alt 文本的 img Background is a BACK ground
标签: html css image twitter-bootstrap