html - 移动版背景显示不正确。HTML CSS
问题描述
在电脑版中展开 <500px 时,背景看起来应该。在移动版后台“曲线”。
html
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
css
@media screen and (max-width: 500px) {
body {
background-image: url("../img/background-body-500px.jpg");
background-position: center;
background-repeat: no-repeat;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background-attachment: fixed;
}
}
电脑网络
移动网络
解决方案
推荐阅读
- angular - 从 component.ts 在 Angular 7 中添加内联 css
- apache-nifi - 多个字段的 NiFi LookupRecord
- python - 你如何通过 Groupby 进行绘图?
- mysql - MariaDB SQL 插入与选择
- vue.js - 使用 UIKit uk-sortable 时留下一个副本
- javascript - 使用 SVG 时 ScrollIntoView 在 Firefox 中出现问题
- python - Celery + RabbitMQ - 使用 Celery 进行简单的消息传递
- batch-file - 如何在批处理文件中转义波浪号 (~) 以将其替换为不同的字符?
- android - 在 popUpTo 的帮助下使用导航组件导航片段
- java - 如何从 XSD 泛型获取数据类型