顶部添加彩色进度条

美化教程

CSS代码:

  此处内容已藏匿,顶部黄金会员可见

  请登录后查看特权

javascript代码:

//进度条载入显示 $(<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/701.html" title="View all posts in window">window</a>).scroll(function(){ var a = $(window).scrollTop(),添加条云服务器购买优惠活动 c = $(document).height(), b = $(window).height(); scrollPercent = a / (c - b)*100; scrollPercent = scrollPercent.toFixed(1); $("#percentageCounter").css({ width: scrollPercent + "%" }); }).trigger("scroll"); //进度条载入显示 $(<a target="_blank" href="https://www.kaiyuanyuanma.com/tag/701.html" title="View all posts in window">window</a>).scroll(function() { var a = $(window).scrollTop(), c = $(document).height(), b = $(window).height(); scrollPercent = a / (c - b) * 100; scrollPercent = scrollPercent.toFixed(1); $("#percentageCounter").css({ width: scrollPercent + "%" }); }).trigger("scroll"); //进度条载入显示 $(window).scroll(function() { var a = $(window).scrollTop(), c = $(document).height(), b = $(window).height(); scrollPercent = a / (c - b) * 100; scrollPercent = scrollPercent.toFixed(1); $("#percentageCounter").css({ width: scrollPercent + "%" }); }).trigger("scroll");

在主题目录header.php中,添加以下代码,彩色云服务器购买优惠活动放在body标签下(最后一行)

进度<div id="percentageCounter"></div> 内容看完了
皖ICP备2025077989号-141