您好,是否可以将背景图像放置在页面中心的固定位置?
最佳答案
是的,这是可能的。使用以下代码。
body {
background: url("yourimage.gif") 50% 50% no-repeat;
}
关于html - 如何用CSS放置背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18810405/
标签 html css background
您好,是否可以将背景图像放置在页面中心的固定位置?
最佳答案
是的,这是可能的。使用以下代码。
body {
background: url("yourimage.gif") 50% 50% no-repeat;
}
关于html - 如何用CSS放置背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18810405/