码迷,mamicode.com
首页 > Web开发 > 详细

仅用CSS3创建h5预加载跳动圈

时间:2016-07-30 18:04:08      阅读:225      评论:0      收藏:0      [点我收藏+]

标签:

<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>

仅用CSS3创建h5预加载跳动圈

标签:

原文地址:http://www.cnblogs.com/luckyXcc/p/5721250.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!