how to position a background for a big image which is centered at the center of the page?

不打扰是莪最后的温柔 提交于 2019-12-02 04:17:45

You can now set a background image to stretch to the edges of the container in various ways. If you don't mind the image distorting, you would do it like this:

background-size: 100% 100%;

Rather than this (which is broken)

style="style="background:url("img/bg.png") no-repeat fixed center top; width:100%; height:100%;"

try this in your style sheet:

body {
    background-image:url("img/bg.png");
    background-size: 100% 100%;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!