添加如下代码:
给 hexo next 加上背景图片,首先启用相应的styl
1 2 3 4 5 6 7 8 9 10 11 12 13
|
custom_file_path: style: source/_data/styles.styl
|
修改source/_data/styles.styl
添加几行代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
body { height: 100%; width: 100%; background-color: rgba(0, 0, 0, .5); background-blend-mode: multiply; background-image:url(https://api.dongmanxingkong.com/suijitupian/acg/1080p/index.php); background-repeat: no-repeat; background-attachment:fixed; background-position:center center; background-size:cover; }
.comments, .pagination, .post-block, .popup, .sidebar { opacity:0.8; }
.header-inner { background: rgba(255,255,255,0.8); }
@media (prefers-color-scheme: dark){ .header-inner { background: rgba(51,51,51,0.8); }
|