首页 > 解决方案 > Bootstrap轮播上的背景图像放置

问题描述

我正在尝试在旋转木马的左右两侧放置背景图像。问题是轮播具有set-width(max-width:1000px)margin:auto用于居中,因此没有空间在轮播周围放置覆盖图或背景图像。有没有办法将背景图片放在轮播后面?

页面截图如下 项目页面截图

标签: htmlcsstwitter-bootstrapbackground-image

解决方案


将轮播包裹在一个宽度为 100% 的容器 div 中,并将背景图像放在上面。

<div class = "div-with-background-image">
  <div class = "carousel">
    <!-- carousel stuff in here -->
  </div>
</div>

推荐阅读