我正在尝试让以下基于 wordpress 的网站拥有一个连续的背景图片:
Startup Roadmap | Idea Generation
我可以更改单个元素的背景,但还没有找到一种方法让单个背景像 this 一样延伸到整个屏幕。 .
感谢您的帮助!
最佳答案
将此 CSS 添加到您的主体类
body.custom-background {
background: url('/wp/wp-content/themes/twentyfourteen/assets/BG.jpg');
background-size: auto 100%;
background-size: cover;
background-position: center center;
background-attachment: fixed;
}
关于php - 将背景图像添加到整个屏幕,跨所有 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21843654/