首页/技术/文章阅读

网站Pjax加载动画代码和版权提示代码

技术 2020-02-22 37 1
仅针对于本站相同的主题,若不是一样的主题,则Pjax加载动画是可能失效的,无法加载。 代码大牛可以自行修改代码以做到适配你的网站程序。 这里说一下,下面的第三方存储库做了防盗链,需要的可以先自行访问,然后下载到你自己的服务器上使用。地址也修改成你自己的网站对应的地址,否则代码无法运行,因为没有js文件的加载。 代码备份:
<!-- <script type="text/javascript" src="https://cdn.bootcss.com/sweetalert/2.1.2/sweetalert.min.js"></script>
<script>
  window.onload = function(){
    document.body.oncopy = function() {
      swal("复制完成", "转载请务必保留原文链接,申明来源,谢谢合作!","success");
    };
  }
</script> -->
<!-- Pjax等待效果 -->
<link rel="stylesheet" type="text/css" href="https://i1.a.zyooo.com/www_lanqing_net/jsandcss/pjaxcss.css" /> 
<div id="loading-mask" class="loading-mask" data-no-instant></div>
<div class="loading-anim" data-no-instant>
<div id="colorful-loading">
<span class="colorful-loading-item-1"></span>
<span class="colorful-loading-item-2"></span>
<span class="colorful-loading-item-3"></span>
<span class="colorful-loading-item-4"></span>
<span class="colorful-loading-item-5"></span>
<span class="colorful-loading-item-6"></span>
<span class="colorful-loading-item-7"></span>
</div>
</div>
<script data-no-instant>
(function() {
    InstantClick.on('wait', function () {
        jQuery('.loading-mask, .loading-anim').show();
    });
    InstantClick.on('receive', function () {
        jQuery('.loading-mask, .loading-anim').fadeOut();
    });
})();
</script>
具体样式长这样:网站Pjax加载动画代码和版权提示代码 版权提示代码效果请参考下面的文章: [post id="53"] 所有远程链接建议替换为你自己的,具体的方法是下载该js文件,或者直接通过本站访问之后复制js代码到你的本地文件中粘贴保存即可。 本站的CDN存储均开启了防盗链,直接调用会被系统拦截的。

正文结束

wordpress超级强悍的缓存加速站点插件wordpress5.0之前后台编辑器的路径是什么

评论区

哈辛达 · ad***@cooluc.com1楼

好看,拿走了[调皮]