【wordpress美化教程】之鼠标点击页面出现富强自由等文字特效
教程开始
aft为大家收集了四种实现方式。
找到主题的footer.php并将以下内容整体复制进去并保存
type=“text/javascript”>/* 鼠标特效 */vara_idx=0;jquery(document).ready(function($){$(“body”).click(function(e){vara=newarray(“富强”,“民主”,“文明”,“和谐”,“自由”,“平等”,“公正”,“法治”,“爱国”,“敬业”,“诚信”,“友善”);var$i=$(““).text(a[a_idx]);a_idx=(a_idx+1)%a.length;varx=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();});});});第二种和第一种的感觉差别没有太大,就是在文字方面做了一些改变
type=“text/javascript”>/* 鼠标特效 */vara_idx=0;jquery(document).ready(function($){$(“body”).click(function(e){vara=newarray(“❤富强❤”,“❤民主❤”,“❤文明❤”,“❤和谐❤”,“❤自由❤”,“❤平等❤”,“❤公正❤”,“❤法治❤”,“❤爱国❤”,“❤敬业❤”,“❤诚信❤”,“❤友善❤”);var$i=$(““).text(a[a_idx]);a_idx=(a_idx+1)%a.length;varx=e.pagex,y=e.pagey;$i.css({“z-index”:999999999999999999999999999999999999999999999999999999999999999999999,“top”:y–20,“left”:x,“position”:“absolute”,“font-weight”:“bold”,“color”:“rgb(“+~~(255*math.random())+“,”+~~(255*math.random())+“,”+~~(255*math.random())+“)”});$(“body”).append($i);$i.animate({“top”:y–180,“opacity”:0},1500,function(){$i.remove();});});});第三种,字体颜色随机,大小循环变小变大
type=“text/javascript”>/* 鼠标特效 */$(function(){vara_idx=0,b_idx=0;c_idx=0;jquery(document).ready(function($){$(“body”).click(function(e){vara=newarray(“欢迎您”,“么么哒”,“你真好”,“棒棒哒”,“真可爱”,“你最美”,“喜欢你”,“真聪明”,“爱你哦”,“好厉害”,“你真帅”,“祝福你”),b=newarray(“09ebfc”,“ff6651”,“ffb351”,“51ff65”,“5197ff”,“a551ff”,“ff51f7”,“ff518e”,“ff5163”,“efff51”),c=newarray(“12”,“14”,“16”,“18”,“20”,“22”,“24”,“26”,“28”,“30”);var$i=$(““).text(a[a_idx]);a_idx=(a_idx+1)%a.length;b_idx=(b_idx+1)%b.length;c_idx=(c_idx+1)%c.length;varx=e.pagex,y=e.pagey;$i.css({“z-index”:999,“top”:y–20,“left”:x,“position”:“absolute”,“font-weight”:“bold”,“font-size”:c[c_idx]+“px”,“color”:b[b_idx]});$(“body”).append($i);$i.animate({“top”:y–180,“opacity”:0},1500,function(){$i.remove();});});});var_hmt=_hmt||[];})第四种、数字点击特效
ad:【百度云分享】大学生必备,互联网精品福利资源下载
标签:wordpress
上一篇本站福利小工具下一篇【wordpress美化教程】之实现复制弹出提示框
相关推荐
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)
![951d4dff3c22e9f-433 951d4dff3c22e9f-433](https://www.sjztyd.com/wp-content/uploads/2022/07/951d4dff3c22e9f-433.png)