欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

网页点击特效 - 鼠标点击浮现*核心价值观

程序员文章站 2022-05-30 23:26:10
...

原文地址(推荐):https://blog.7core.cn/thread-25.htm

效果演示 >> https://7Core.CN

任选一种方法插入到< html >标签内即可


方法一(简洁):

<script type="text/javascript" src="https://www.7Core.cn/7Core/7Core-Effect.js"></script>

方法二:

<script type="text/javascript">
        /* 鼠标点击特效 - 7Core.CN */
        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": 100000000,"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>