html - 如何用CSS放置背景图片

标签 html css background

您好,是否可以将背景图像放置在页面中心的固定位置?

最佳答案

是的,这是可能的。使用以下代码。

body {
  background: url("yourimage.gif") 50% 50% no-repeat;
}

关于html - 如何用CSS放置背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18810405/

相关文章:

html - 更改 Bootstrap 容器的宽度

php - 后台处理视频上传,有什么精通PHP的方法?

html - map 标签在 HTML 中不起作用

javascript - 无法让我的 js 在我的 Bootstrap 导航栏中工作

linux - Bash 在后台运行函数

CSS3渐变和背景图片结合

c# - 在 outlook 中附加一个 html 页面作为 c# 应用程序中的 word 文档

javascript - jQuery ScrollTop .. ."disable"当击中屏幕底部时

html - IE 中奇怪的 z-index 或链接问题

javascript - 无法在 chrome 中使用键盘滚动页面