【发布时间】:2014-12-16 03:34:06
【问题描述】:
虽然从 StackOverflow 的许多主题中尝试过,但我一直在为这个问题苦苦挣扎,只是想知道是否有人有任何建议!
我正在使用 Bootstrap 3,基本上我想将图像放置在容器 <div> 中,它将随着浏览器窗口调整大小,内容仍然保留在其中。那么我怎样才能让它响应呢?提前谢谢!
HTML
<div id="special-dishes-section">
<div class="container">
<div class="special-dishes">
</div> <!-- end special-dishes -->
</div> <!-- end container -->
</div> <!-- end special-dishes-section -->
CSS
#special-dishes-section{
background: url('../images/special-dishes-bg.jpg') no-repeat center center;
min-height: 560px;
padding: 71px 0 65px 0;
position: relative;
}
.special-dishes{
background: url('../images/wooden-bg.png') no-repeat center center;
min-height: 424px;
}
【问题讨论】:
-
图片是要放在
标签还是css background-images中?
标签: html css image twitter-bootstrap responsive-design