如何使用媒体查询在Bootstrap 4中以特定宽度阻止视差?

时间:2019-02-17 02:19:38

标签: css3 bootstrap-4

我想在屏幕宽度小于800px时阻止视差效果,但是,看来我的CSS不能正常工作:

.parallax{
background-image:url(resources/newbg.png);
height:100vh;
background-attachment:fixed;
background-position:center;
background-repeat:no-repeat;
background-size:cover;
}

和屏幕尺寸的css:

    @media (min-width: 800x) {
.parallax{
background-image:url(resources/newbg.png) !important;
height:100vh !important;
background-attachment:scroll !important;
background-position:center !important;
background-repeat:no-repeat !important;
background-size:cover !important;
}}

谢谢您的帮助!

0 个答案:

没有答案