我有一个包含 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%;
}
}
问题是在移动背景中,背景只影响第一个网格,其他网格不继承任何东西,我想保留图像抛出所有网格。如果不可能我想制作图像
cover & fixed
但也不起作用。
你们有什么想法吗?
最佳答案
大家好,这里是问题的快速解决方案。
@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
}}
overflow-y:auto; this did the trick:)
关于css - Bootstrap 如何在移动设备中为所有网格保留背景图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39847531/