【问题标题】:Bootstrap How do i keep a background image in mobile for all grids?Bootstrap 如何在移动设备中为所有网格保留背景图像?
【发布时间】:2016-10-04 08:25:48
【问题描述】:

我有一个包含 3 个网格的布局,.row > grid1 grid2 gird3。 .row 有一个影响所有网格的背景图像(这是我想要的),但在移动设备中,我希望网格在另一个下方(而且效果很好)

@media screen and (min-width:320px) and (max-width:768px) and (orientation:portrait) {
     #mainBody > .container > .row > div > .content-box > div > div.grid-column-component.col-sm-6 {
        height: auto;
        width: 100%;
    }
}

问题是当在移动设备中,背景只影响第一个网格,其他的什么都不继承,我想保持图像抛出所有的网格。如果不可能,我想制作图像

覆盖和固定

但也不工作。

你们有什么想法吗?

【问题讨论】:

    标签: css twitter-bootstrap mobile background-image


    【解决方案1】:

    大家好,这里是问题的快速解决方案。

    @media screen and (min-width:320px) and (max-width:768px) and (orientation:portrait) {
     #mainBody > .container > .row > div > .content-box > div > div.grid-column-component.col-sm-6 {
        height: auto;
        width: 100%;
        overflow-y:auto
     }}
    

    溢出-y:auto; 这成功了:)

    【讨论】:

      猜你喜欢
      • 2016-05-14
      • 2017-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-30
      相关资源
      最近更新 更多