Hexo-indigo 主题,添加点击出现小桃心效果

像我这样

我的hexo目录为hexofile


第一步,新建clicklove.js文件

在hexofile\themes\indigo\source\js目录下新建clicklove.js文件,将下列代码复制进去。

!function(e,t,a){function n(){c(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"),o(),r()}function r(){for(var e=0;e

第二步,在主页面代码中插入js文件

打开hexofile\themes\indigo\layout\layout.ejs文件
插入js代码,代码为


像我这样


Hexo-indigo 主题,添加点击出现小桃心效果_第1张图片
如图

第三步,重新生成hexo文件

Hexo-indigo 主题,添加点击出现小桃心效果_第2张图片
image
hexo clean
hexo g
hexo d

完事。

你可能感兴趣的:(Hexo-indigo 主题,添加点击出现小桃心效果)