美文网首页
简单的页面loading效果

简单的页面loading效果

作者: AMONTOP | 来源:发表于2020-04-04 13:55 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    #page-preloader {
      position: fixed;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;
      width: 100%;
      height: 100%;
      background: #f1f3f2;
      z-index: 100500;
    }
    #page-preloader .spinner {
      display: block;
      position: absolute;
      left: 50%;
      top: 50%;
      width: 100px;
      height: 100px;
      margin-top: -50px;
      margin-left: -50px;
      border: 3px solid transparent;
      border-top-color: #ff6400;
      border-radius: 50%;
      z-index: 1001;
      -webkit-animation: spin 2.5s infinite linear;
      animation: spin 2.5s infinite linear;
    }
    #page-preloader .spinner:before {
      top: 5px;
      left: 5px;
      right: 5px;
      bottom: 5px;
      border: 3px solid transparent;
      border-top-color: #088cdc;
      -webkit-animation: spin 2s infinite linear;
      animation: spin 2s infinite linear;
    }
    #page-preloader .spinner:after {
      top: 15px;
      left: 15px;
      right: 15px;
      bottom: 15px;
      border: 3px solid transparent;
      border-top-color: #52bf81;
      -webkit-animation: spin 1s infinite linear;
      animation: spin 1s infinite linear;
    }
    #page-preloader .spinner:before, #page-preloader .spinner:after {
      content: '';
      position: absolute;
      border-radius: 50%;
    }
    @-webkit-keyframes spin { 0% { -webkit-transform: rotate(0); transform: rotate(0); }
      100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }

    @keyframes spin { 0% { -webkit-transform: rotate(0); transform: rotate(0); }
      100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
  </style>
</head>
<body>
<div id="page-preloader"><span class="spinner"></span></div>


<script src="js/jquery-1.11.3.min.js"></script>
<script>
  $(window).on('load', function () {
    var $preloader = $('#page-preloader'),
    $spinner = $preloader.find('.spinner');
    $spinner.fadeOut();
    $preloader.delay(350).fadeOut(800);
  });
</script>
</body>
</html>


<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            .circle{
                background-color:#B0865B;
                width:15px;
                height:15px;
                border-radius:100%;
                margin:2px;
                border:2px solid #B0865B;
                border-bottom-color:transparent;
                height:80px;
                width:80px;
                background:0 0!important;
                display:inline-block;
                animation:rotate .75s 0s linear infinite;
            }
            @keyframes rotate{
                0%{transform:rotate(0deg)}
                50%{transform:rotate(180deg)}
                100%{transform:rotate(360deg)}}
        </style>
    </head>
    <body>
        <div class="circle">
            
        </div>
    </body>
</html>

相关文章

网友评论

      本文标题:简单的页面loading效果

      本文链接:https://www.haomeiwen.com/subject/wkjqyctx.html