首页 > 解决方案 > 移动版背景显示不正确。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;
}

}

电脑网络

电脑网络

移动网络

移动网络

标签: htmlcssadaptive-design

解决方案


推荐阅读