【发布时间】: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