【问题标题】:Safari Mobile - Problem with background imageSafari Mobile - 背景图片有问题
【发布时间】:2021-02-15 05:16:01
【问题描述】:

部署后我的网站出现问题。在移动版 Safari 上,背景图像渲染得很糟糕,看起来像 144p。我检查了 Android 上的网站 - Google Chrome、Firefox 和 Opera - 网站运行正常。

有人知道解决办法吗?

.driver {
    height: 100vh;
    background-image: url("/assets/img/unrevied/brooke-lark-pGM4sjt_BdQ-unsplash.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    -o-background-size: cover;
    -moz-background-size: cover;
    -webkit-background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;

    @include overlay(#000, 0.2);

    @media (max-width: width 1000px) {
        background-position: left center;
    }
}

【问题讨论】:

标签: html css


【解决方案1】:
background-attachment: fixed;

Safari IOS 不支持。

https://caniuse.com/?search=background-attachment 您可能需要执行一些操作,例如显示带有大小封面的背景图像。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-10
    • 2011-06-09
    • 2015-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-09
    相关资源
    最近更新 更多