zoukankan      html  css  js  c++  java
  • 仅用CSS3创建h5预加载跳动圈

    <head>

    <meta charset="UTF-8">

    <title></title>

    <style type="text/css">

    #box{

    width: 400px;

    height: 400px;

    margin: 100px auto 0;

    position: relative;

    }

    span{

    position: absolute;

    width: 16px;

    height: 16px;

    border-radius: 50%;

    background: #fff;

    -webkit-animation: a 1s infinite linear;

    }

    span:nth-child(1){

    left: 0px;

    -webkit-animation-delay: 0s;

    }

    span:nth-child(2){

    left: 20px;

    -webkit-animation-delay: 0.25s;

    }

    span:nth-child(3){

    left: 40px;

    -webkit-animation-delay: 0.5s;

    }

    span:nth-child(4){

    left: 60px;

    -webkit-animation-delay: 0.75s;

    }

    span:nth-child(5){

    left: 80px;

    -webkit-animation-delay: 1s;

    }

    @-webkit-keyframes a{

    0%{-webkit-transform: translateY(0px); opacity: 0.5;}

    50%{-webkit-transform: translateY(-30px); opacity: 1;}

    100%{-webkit-transform: translateY(0px); opacity: 0.5;}

    }

    </style>

    </head>

    <body style="background-color: royalblue;">

    <div id="box">

    <span></span>

    <span></span>

    <span></span>

    <span></span>

    <span></span>

    </div>

    </body>

  • 相关阅读:
    法正(44):鄙视
    法正(43):许攸
    法正(42):孔明
    法正(41):帮派
    法正(40):常委
    法正(39):寡妇
    法正(38):吴苋
    法正(37):刘备
    法正(29):暗弱
    法正(36):花瓶
  • 原文地址:https://www.cnblogs.com/luckyXcc/p/5721250.html
Copyright © 2011-2022 走看看