WordPress教程-子比主题美化底部页脚排版+各种认证图标以及渐变时间运行

把以下代码放到子比主题后台-页面显示-底部页脚-第二行(建议为版权提醒,备案号等)这个里面

Copyright © 2023·<a href="https://www.youyuanvip.com">优源网</a><span style="margin-left: 5px;" id="showsectime">已安全运行:56天15小时52分</span>
</a>
  <div style="margin-top: 5px;">
<a href="https://icp.gov.moe/?keyword=20232400" target="_blank"><img src="https://pic.imgdb.cn/item/64e8194b661c6c8e54df8111.png">萌ICP备20232400号</a>
      <a target="_blank" href="https://beian.miit.gov.cn/#/Integrated/index"><img src="https://pic.imgdb.cn/item/64e8194b661c6c8e54df810b.png">皖ICP备2022000334号-2</a>      
  
  
  <div style="margin-top: 5px;">
    <img src="https://pic.imgdb.cn/item/64e817f2661c6c8e54dedbd9.png" style="width:80px;height:32px;">
    <img src="https://pic.imgdb.cn/item/64e81726661c6c8e54deae84.png" style="width:80px;height:32px;">
    <img src="https://pic.imgdb.cn/item/64e81726661c6c8e54deae69.png" style="width:80px;height:32px;">
    <img src="https://pic.imgdb.cn/item/64e81726661c6c8e54deae59.png" style="width:80px;height:32px;">
    <img src="https://pic.imgdb.cn/item/64e81726661c6c8e54deae4b.png" style="width:80px;height:32px;">
    <img src="https://pic.imgdb.cn/item/64e81726661c6c8e54deae3f.png" style="width:80px;height:32px;">
  </div>

  <script type="text/javascript">
    function NewDate(str) {
      str = str.split('-');
      var date = new Date();
      date.setUTCFullYear(str[0], str[1] - 1, str[2]);
      date.setUTCHours(0, 0, 0, 0);
      return date;
    }
    function showsectime() {
      var birthDay = NewDate("2022-1-1");
      var today = new Date();
      var timeold = today.getTime() - birthDay.getTime();
      var sectimeold = timeold / 1000
      var secondsold = Math.floor(sectimeold);
      var msPerDay = 24 * 60 * 60 * 1000; var e_daysold = timeold / msPerDay;
      var daysold = Math.floor(e_daysold);
      var e_hrsold = (daysold - e_daysold) * -24;
      var hrsold = Math.floor(e_hrsold);
      var e_minsold = (hrsold - e_hrsold) * -60;
      var minsold = Math.floor((hrsold - e_hrsold) * -60); var seconds = Math.floor((minsold - e_minsold) * -60).toString();
      document.getElementById("showsectime").innerHTML = "已安全运行:" + daysold + "天" ;
      setTimeout(showsectime, 1000);
    } showsectime();
  </script>
</div>
<style>
  #showsectime {
    animation: change 10s infinite;
    font-weight: 800;
  }

  @keyframes change {
    0% {
      color: #5cb85c;
    }

    25% {
      color: #556bd8;
    }

    50% {
      color: #e40707;
    }

    75% {
      color: #66e616;
    }

    100% {
      color: #67bd31;
    }
  }
</style>

效果图

图片[1]-WordPress教程-子比主题美化底部页脚排版+各种认证图标以及渐变时间运行 - 优源网-优源网
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
评论 共1条
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称