css - 如何使用媒体查询在引导程序 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;
}}
谢谢您的帮助!
解决方案
推荐阅读
- c# - 如何对下拉列表数据文本字段进行 html 解码?
- debugging - 调试在 Windows 应用程序上运行的 javascript 网页
- c - FFTW 单精度库在使用 SIMD 优化时输出不正确的 DFT
- swift - 尝试对物体进行 360 度旋转
- excel - 使用 VBA 通过屏幕抓取获取自定义元素
- idl-programming-language - 如何在 IDL 编程语言中为多个图分配多个标题
- python - 无法通过 pyenv 在 Ubuntu 20.04 上降级 Python 3.4 的 sqlite3.sqlite_version 以运行 tox 测试
- git - HG-Git:AttributeError:“字节”对象没有属性“编码”
- dbase - dbf 文件(dBase 7 格式)中的时间戳字段没有意义
- u-boot - 修改 U-Boot 以依赖 mmc 中的地址而不是文件系统