<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
}
.loading {
height: 100%;
width: 100%;
position: fixed;
background: rgba(255, 255, 255, 1);
z-index: 9999999999999999999999999999;
}
.loading>p {
position: absolute;
left: 54px;
right: 0;
bottom: 61.8%;
margin: auto;
height: 30px;
width: 120px;
}
.loading>p i {
display: block;
float: left;
margin: 0 5px;
width: 5px;
height: 30px;
background: #000;
transform: scaleY(0.3);
animation: loading 1s ease infinite alternate;
}
.loading>p i:nth-child(2) {
animation-delay: 0.1s;
}
.loading>p i:nth-child(3) {
animation-delay: 0.2s;
}
.loading>p i:nth-child(4) {
animation-delay: 0.3s;
}
.loading>p i:nth-child(5) {
animation-delay: 0.4s;
}
@keyframes loading {
40%,
100% {
transform: scaleY(0.3);
}
20% {
transform: scaleY(1);
}
}
</style>
</head>
<body>
<div class="loading">
<p>
<i></i>
<i></i>
<i></i>
<i></i>
<i></i>
</p>
</div>
</body>
<script>
$(window).load(function() {
$('.loading').fadeOut();
});
</script>
</html>
(刚刚发现技术胖也写过。地址贴上,可以看看。技术胖loading css实现)