Closed K1nako0 closed 1 year ago
配置里似乎是不能添加固定背景的( 所以要自定义
解决了谢谢作者的解答。顺便学习一下,如果想让背景跟着滚动一起移动该如何实现呢
。。应该是要再添加一个元素
先在 layout.ejs
的 <body>
里写
<div id="background"></div>
然后在 main.css
写(opacity
透明度可以调一下)
#background {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-image: url(...);
opacity: 0.2;
z-index: -1;
}
好的好的,谢谢作者大大
如何添加固定背景,效果如图 滚动背景不会动的那种效果 我是个什么都不懂的小白