Bootstrap CSS媒体查询未生成任何响应

368yc8dk  于 2022-12-08  发布在  Bootstrap
关注(0)|答案(2)|浏览(164)

当屏幕尺寸小于1052px时,我试图使标题图像静态化,以便它占据视口的整个宽度,但只有当屏幕尺寸小于992px时,才会应用样式。这是来自Angela Yu的Web开发课程。
第一个
这是它看起来的样子,请帮助我。

uinbv5nw

uinbv5nw1#

try something like

@media only screen and (max-width: 1052px) {
    .title-image {
        position: static;
    }
}

You've also set the columns to always be half the screen width, you might also need to add col-12 along with col-lg-6 so that on smaller screens it goes full width

olhwl3o2

olhwl3o22#

Change your media query to:

@media only screen and (max-width: 1052px) {
  .title-image {
    position: static;
  }
}

相关问题