• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

给Typecho、Emlog等博客网站添加鼠标点击文字特效 – Rat’s Blog

网络资源 Liam 1年前 (2019-04-27) 273次浏览 2个评论 扫描二维码
文章目录[隐藏]

说明:鼠标点击文字特效很多博客都有,相信也有很多人需要,这里就分享个方法,适合大部分博客,包括TypechoEmlog等。有兴趣的可以试试。

截图

给Typecho、Emlog等博客网站添加鼠标点击文字特效 - Rat's Blog

方法

将代码放在主题的footer.php中的</body>之前即可。

<script type="text/javascript">  /* 鼠标特效 */ var a_idx = 0;  jQuery(document).ready(function($) {      $("body").click(function(e) {          var a = new Array("富强", "民主", "文明", "和谐", "自由", "平等", "公正" ,"法治", "爱国", "敬业", "诚信", "友善");          var $i = $("<span/>").text(a[a_idx]);          a_idx = (a_idx + 1) % a.length;          var x = e.pageX,          y = e.pageY;          $i.css({              "z-index": 999999999999999999999999999999999999999999999999999999999999999999999,              "top": y - 20,              "left": x,              "position": "absolute",              "font-weight": "bold",              "color": "#ff6651"          });          $("body").append($i);          $i.animate({              "top": y - 180,              "opacity": 0          },          1500,          function() {              $i.remove();          });      });  });  </script>

特效字体可以自行设置。


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:给Typecho、Emlog等博客网站添加鼠标点击文字特效 – Rat’s Blog
喜欢 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(2)个小伙伴在吐槽
  1. Please let me know if you're looking for a article writer for your site. You have some really good posts and I feel I would be a good asset. If you ever want to take some of the load off, I'd love to write some material for your blog in exchange for a link back to mine. Please send me an e-mail if interested. Kudos! adreamoftrains web hosting service
    adreamoftrains best website hosting2020-08-11 14:11 (1天前)回复 Linux | Chrome 66.0.3359.158
  2. Nice blog right here! Also your site so much up very fast! What web host are you the usage of? Can I get your affiliate link in your host? I want my site loaded up as fast as yours lol
    web hosting reviews2020-08-10 14:25 (2天前)回复 Linux | Firefox浏览器 60.0.2