把背景图片放在images文件夹下
文件路径:"F:\1-blog\MyWeb\themes\next\source\images\ia_100000000.webp"
在文章前加入代码
1 2 3 4 5 6 7 8 9 10
| <style> body { background: url(/images/ia_100000000.webp) no-repeat center; background-size: cover; background-attachment: fixed; background-size: 100%; opacity: 0.9; } </style>
|
如果文章没有白色背景填充
在style标签里继续加入如下代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| .header-inner { padding-top: 100px; background: #ffffff; border-radius: 20px 20px 0px 0px; } .site-brand-container { display: flex; flex-shrink: 0; padding: 0 10px; background: #ffffff; } .menu { margin: 0; padding: 1em 0; text-align: center; background: #ffffff; } .post-block { background: #ffffff; border-radius: 0px 0px 20px 20px; padding: 40px; }
|