【问题标题】:tumblr background image stretched vertically in mobiletumblr 背景图像在移动设备中垂直拉伸
【发布时间】:2017-10-12 09:51:46
【问题描述】:

我有一个使用this theme 设置样式的 Tumblr 页面,我想要一个完整的页面背景图片。无论我尝试什么,它在桌面上看起来都很棒,但在移动设备(iOS 10.3.1 中的 Safari)上,当我向页面添加更多内容时,图像会垂直拉伸。结果看起来高度像素化并且看起来很糟糕。

我首先尝试使用 Tumblr 的主题自定义选项直接上传图片,但现在我正在使用这个自定义 CSS:

html, body {
min-height: 100%;
}
body {
background-image: url(http://myurl.com/myimage.jpg);
background-repeat: no-repeat;
background-position: 0 0;
background-size: cover;
}
@media (min-width: 1120px), (min-height: 630px) {
body { background-size: auto; }
}

有没有人能解决这个问题?谢谢!

【问题讨论】:

  • 尝试设置 background-size: 100% 100%

标签: html css image background tumblr


【解决方案1】:

您是否尝试过将背景大小从自动更改为覆盖?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-03-26
    • 1970-01-01
    • 1970-01-01
    • 2017-04-22
    • 2011-11-12
    • 2017-01-18
    • 1970-01-01
    相关资源
    最近更新 更多