本文主要是介绍Hexo之NexT主题中设置canvas-nest特效,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
前言
- Hexo版本:4.2.0
- NexT版本:7.7.1
- NexT中集成有canvas_nest插件
- GitHub:theme-next-canvas-nest
- canvas-nest特效展示
安装部署
1)配置NexT主题配置文件themes/next/_config.yml
a)开启canvas_nest
# Canvas-nest
# Dependencies: https://github.com/theme-next/theme-next-canvas-nest
# For more information: https://github.com/hustcc/canvas-nest.js
# 若要开启canvas_nest,除了此处设置成true,还需要设置canvas_nest的vendors提供商
canvas_nest:#enable: falseenable: trueonmobile: true # Display on mobile or notcolor: "0,0,255" # RGB values, use `,` to separateopacity: 0.5 # The opacity of line: 0~1zIndex: -1 # z-index property of the backgroundcount: 99 # The number of lines
b)设置canvas_nest脚本来源:在配置文件vendors选项下取消canvas_nest cdn注释
# Internal version: 1.0.0# 设置canvas_nest的来源canvas_nest: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest.min.jscanvas_nest_nomobile: //cdn.jsdelivr.net/gh/theme-next/theme-next-canvas-nest@1/canvas-nest-nomobile.min.js# canvas_nest:# canvas_nest_nomobile:
End~
这篇关于Hexo之NexT主题中设置canvas-nest特效的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!