Matery主题自定义(三)页面特效
Matery主题自定义(三)页面特效
虽然 Matey 主题原生已经非常不错了,但总感觉少了些什么,就准备将我原来再 Fluid 主题上使用的特效配置过来
banner 冒泡
创建 buble.js
在 themes>hexo-theme-matery>source>libs>others
下创建一个新的文件 buble.js,将下面的代码 CV 到 buble.js 中
1 | // 上升的气泡 |
_config.yml 配置
接着将这个文件在主题的配置文件(**_config.yml**)中 lib:js:
下引入,大约在 458 行
1 | buble: /libs/others/buble.js |
在主题的配置文件(**_config.yml**)中添加下面的代码
1 | # banner 冒泡 |
引用
在 themes>hexo-theme-matery>layout>layout.ejs
这的 body
标签中添加下面的代码
1 | <!-- 冒泡 --> |
banner 冒泡的效果就完成了
点击鼠标弹出文字
点击鼠标弹出文字的步骤与实现冒泡的步骤相似,下面就开始如法炮制
创建 buble.js
在 themes>hexo-theme-matery>source>libs>others
下创建一个新的文件 popupText.js,将下面的代码 CV 到 popupText.js 中
1 | // 点击出字 |
_config.yml 配置
接着将这个文件在主题的配置文件(**_config.yml**)中 lib:js:
下引入,大约在 458 行
1 | popupText: /libs/others/popupText.js |
在主题的配置文件(**_config.yml**)中添加下面的代码
1 | # 是否激活页面点击弹出文字, 只在桌面版网页启用特效 |
引用
在 themes>hexo-theme-matery>layout>layout.ejs
这的 body
标签中添加下面的代码
1 | <!-- 弹出文字 --> |
点击鼠标弹出文字的效果就完成了
Matery 主题添加 js 特效的步骤都差不多,你按照我上面的步骤走,修改一些数据,就差不多可以效果展示了
Matery 主题自定义持续更新中…
参考
-
感谢你赐予我前进的力量
赞赏者名单
因为你们的支持让我意识到写文章的价值🙏
本文是原创文章,采用 CC BY-NC-ND 4.0 协议,完整转载请注明来自 View Room
评论