给 Hexo 主题添加动态背景

date
Apr 20, 2017
slug
dynamic-background
status
Published
tags
Hexo
themes
主题
动态背景
教程
summary
动态背景,无比炫酷。
type
Post
一步一步来。 #### 修改 _layout.ejs 打开themes/主题名称/layout/_layout.ejs 在 < /body>之前添加代码(不要放在< /head>后)。
以上代码格式并不绝对,可以参照自己所用主题的 _layout 中有 if 的那部分代码。多尝试,并不难。
###### 配置项说明
#### 修改配置文件 打开themes/主题名称/_config.yml,随意找一行,添加代码:
然后运行hexo s,在浏览器的地址栏输入localhost:4000就能看到效果了。
这里的代码主要参照:距离,特此感谢!
最后,欢迎来 Telegram 交流:https://t.me/daiseax
Enjoy!
 
💡
This article is licensed under CC BY-NC-SA 4.0. All rights to the work belong to the author. For commercial use, please contact the author for permission. For non-commercial use, please provide attribution to the source.
Author: Dukewill Source: blog.daisea.com

© Dukewill 1989 - 2024