html - 图像不会在移动 View 之外调整大小 - Bootstrap

标签 html css twitter-bootstrap image-scaling

我正在使用 Bootstrap 开发一个带有固定侧边栏的 container-fluid 全宽网站。

http://nickmask.github.io/index.html

我的 mainContent container 中的图像未调整为平板电脑大小或更大。如果我缩小到移动尺寸,它们会调整得很好。

我尝试添加 img-responsive,但没有成功。有什么想法吗?

HTML:

<div class="col-sm-8 fluidContainer" id="mainContainer">
    <div class="mainHeading">
      <hr class="separator" id="topSep">
      <h1>Recent Work</h1>
      <h2>Blogs and projects recently completed</h2>
      <hr class="separator" id="botSep">
    </div>
    <div class="mainContent">
      <article>
        <img src="http://fillmurray.com/700/280" alt="" class="img-responsive">
        <h2>This article</h2>
        <p>   
          Remember outweigh do he desirous no cheerful. Do of doors water ye guest. We if prosperous comparison middletons at. Park we in lose like at no. An so to preferred convinced distrusts he determine. In musical me my placing clothes comfort pleased hearing.
        </p>     
      </article>

最佳答案

原因是因为您的 #mainContainer 上有 width: auto;。从 #mainContainer 中删除 width: auto; 并将类 img-responsive 添加到图像中,它应该可以工作。

关于html - 图像不会在移动 View 之外调整大小 - Bootstrap,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34282719/

相关文章:

javascript - 带有 Bootstrap 工具提示的图像 map 未显示在正确的位置

html - Bootstrap 的媒体查询不起作用

html - 删除列之间的填充

css - Ember 构建时在 tmp 文件夹中找不到 Bootstrap css 文件

html - CSS 菜单不适用于手机或平板电脑

html - 我怎样才能让我的导航粘在页面顶部?

html - 如何在没有 float 的情况下水平对齐 2 个相邻的 div?

javascript - 在 bootstrap 工具提示标题 data-html 中不起作用的特殊字符 true

javascript - 我如何获得这种类型的移动背景(见图)?

javascript - 页面刷新后执行javascript函数