html5 - How to make the background image display in full screen on the mobile phone (the content is relatively long and has scroll bars), ensuring that the image is not deformed?
为情所困2017-05-16 13:25:30
0
4
1079
My mobile webpage needs a background image. How can I make the background image display in full screen without deformation? With my current settings, the background is deformed! Ask God!
You want to fully display the image without stretching it. If you are really obsessed with this, please provide a reference plan for the design: After feathering the outline of the image, add a background color, and then get the color value of the background color of the image. Set css attributes in main_bg:
background-size:100% auto;
You can try not to set a background image, but use the img tag to display the background image.
background-size: cover; you need to set width in body and HTML first
You want to fully display the image without stretching it. If you are really obsessed with this, please provide a reference plan for the design:
After feathering the outline of the image, add a background color, and then get the color value of the background color of the image. Set css attributes in main_bg: