简体   繁体   中英

tumblr background image stretched vertically in mobile

I have a Tumblr page styled using this theme , and I want a full page background image. No matter what I try, it looks great on desktop, but on mobile (Safari in iOS 10.3.1) the image becomes stretched out vertically as I add more content to the page. The result looks highly pixelated and looks terrible.

I first tried uploading the image directly using Tumblr's theme customization options, but now I'm working with this custom 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; }
}

Does anyone have a solution to this problem? Thanks!

您是否尝试将背景尺寸从自动更改为封面?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM