【问题标题】:Responsive background image Github deployment issue响应式背景图片 Github 部署问题
【发布时间】:2021-04-28 21:12:45
【问题描述】:

我遇到了一个问题,即我的响应式背景图像在部署到 Github 后无法在移动设备上运行。图片在 google chrome 检查移动工具下看起来是正确的,但是当在移动设备上加载实时站点时,图片会覆盖背景,但会放大到左上角。

我在项目中使用materialize,但背景图像使用base css

这是我当前的背景图片代码

html {
  background: url(../assets/images/bg.jpg) no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

这是现场直播: https://connorbreault.dev/

任何帮助将不胜感激!

【问题讨论】:

    标签: css github responsive-design background-image materialize


    【解决方案1】:

    在我看来一切都很好。记得使用这段代码

     overflow-x: hidden;
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-04-12
    • 2015-08-04
    • 2013-04-21
    • 1970-01-01
    • 2016-07-02
    • 1970-01-01
    • 2018-01-01
    相关资源
    最近更新 更多