javascript,css3加载动画
html代码
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>
<title>我的推广</title>
<meta name="description" content="">
<meta name="keywords" content="">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/fontsize.js"></script>
<link href="css/join.css" rel="stylesheet">
</head>
<body style="background:url(images/bg3.png) no-repeat center;background-size: 100% 100%;"> <script type="text/javascript">
(function () {
var body = document.getElementsByTagName('body')[0];
var loader = document.createElement('div');
loader.className = 'spinner-container';
loader.innerHTML = '<div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div><span class="dy-page-loader-text">正在加载</span>';
body.appendChild(loader);
window.onload = function () { setTimeout(function () {
loader.style.display = 'none';
}, 500);
};
})();
</script>
<!-- form -->
<section class="form" id="form">
<form class="join-form" id="join-form">
<span class="title ">我的推广</span>
<ul>
<li>
<span class="s-title">推广链接:</span>
<span class="s-link" onclick="window.location='join-<?php echo $user->user_id;?>.html'">我的推广链接</span>
</li>
</ul>
<div class="s-vip">
<span class="v-title">我的推广会员</span>
<ul>
<?php
foreach($relation_list as $val)
{
?>
<li>
<span class="v-name">
<?php echo $val['open']->name;?></span>
<span class="v-flag">
<?php echo $status[$val['open']->status];?></span>
</li>
<?php } ?></ul>
</div>
</form>
</section>
</body>
</html>
javascript
<script type="text/javascript">
(function () {
var body = document.getElementsByTagName('body')[0];
var loader = document.createElement('div');
loader.className = 'spinner-container';
loader.innerHTML = '<div class="spinner"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div><span class="dy-page-loader-text">正在加载</span>';
body.appendChild(loader);
window.onload = function () { setTimeout(function () {
loader.style.display = 'none';
}, 500);
};
})();
</script>
css3
.spinner-container{
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1001;
background-color: #f7f7f7;
}
.spinner-container .spinner {
margin: 8rem auto 0;
width: 7rem;
text-align: center;
}
.spinner-container span{
text-align: center;
font-size: 0.8rem;
color:#666;
margin-top:1rem;
}
.spinner-container .spinner > div {
width: 26px;
height: 26px;
background-color: #67CF22; border-radius: 100%;
display: inline-block;
-webkit-animation: bouncedelay 1.4s infinite ease-in-out;
animation: bouncedelay 1.4s infinite ease-in-out;
/* Prevent first frame from flickering when animation starts */
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
} .spinner-container .spinner .bounce1{
background: #0dcda7
}
.spinner-container .spinner .bounce2{
background: #cda812
}
.spinner-container .spinner .bounce3{
background: #d52017
}
.spinner-container .spinner .bounce1 {
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s; } .spinner-container .spinner .bounce2 {
-webkit-animation-delay: -0.16s;
animation-delay: -0.16s;
} @-webkit-keyframes bouncedelay {
0%, 80%, 100% { -webkit-transform: scale(0.0) }
40% { -webkit-transform: scale(1.0) }
} @keyframes bouncedelay {
0%, 80%, 100% {
transform: scale(0.0);
-webkit-transform: scale(0.0);
} 40% {
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}
转载自:http://www.cnblogs.com/lhb25/p/loading-spinners-animated-with-css3.html
javascript,css3加载动画的更多相关文章
- 纯css3加载动画
<!DOCTYPE html><html> <head> <meta charset="utf-8"> <meta name= ...
- CSS3加载动画
图1 通常我们都使用gif格式的图片或者使用Ajax来实现诸如这类的动态加载条,但是现在CSS3也可以完成,并且灵活性更大. 选1个例子看看怎么实现的吧: 效果图: 图2 代码: 使用1个名为'l ...
- css3 加载动画效果
Loading 动画效果一 HTML 代码: <div class="spinner"> <div class="rect1&quo ...
- css3 加载动画
代码 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8& ...
- 炫酷CSS3加载动画
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8&qu ...
- 16款纯CSS3实现的loading加载动画
分享16款纯CSS3实现的loading加载动画.这是一款实用的可替代GIF格式图片的CSS3加载动画代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div clas ...
- 用css3制作旋转加载动画的几种方法
以WebKit为核心的浏览器,例如Safari和Chrome,对html5有着很好的支持,在移动平台中这两个浏览器对应的就是IOS和Android.最近在开发一个移动平台的web app,那么就有机会 ...
- 纯css3 加载loading动画特效
最近项目中要实现当页面还没有加载完给用户提示正在加载的loading,本来是想做个图片提示的,但是图片如果放大电脑的分辨率就会感觉到很虚,体验效果很不好.于是就采用css3+js实现这个loading ...
- 2款不同样式的CSS3 Loading加载动画 附源码
原文:2款不同样式的CSS3 Loading加载动画 附源码 我们经常看到的Loading加载很多都是转圈圈的那种,今天我们来换一种有创意的CSS3 Loading加载动画,一种是声波形状的动画,另一 ...
随机推荐
- Linux虚机centos6.5安装Vmware Tools步骤
退出到windows,在虚拟机菜单栏中点击 虚拟机-> 安装 VMWARE TOOLS 子菜单 进入到Linux系统,选择系统工具-终端 命令 su root 或者 su 以root进入 挂在 ...
- OC基础 可变数组与不可变数组的使用
OC基础 可变数组与不可变数组的使用 1.不可变数组 1.1不可变数组的创建 //实例方法 NSArray *array = [[NSArray alloc] initWithObjects:&quo ...
- 关于WinForm/Web如何使用缓存Cach
原文链接:http://www.cnblogs.com/zfanlong1314/archive/2013/03/28/2986403.html Cache 的绝对到期与滑动到期 绝对到期:设置绝对过 ...
- IOC设计模式初步了解(day02)
IOC(Inversion of Control):控制反转. *其他解释:依赖注入.依赖反转…… 设计目标:简化JEE的研发工作,提供IOC容器,控制bean的生成.注入,解耦. 看了网上的一些帖子 ...
- JavaScript的数据类型转换
首先,由于JavaScript是弱类型语言(弱类型的语言的东西没有明显的类型,他能随着环境的不同,自动变换类型而强类型则没这样的规定,不同类型间的操作有严格定义,只有相同类型的变量才能操作,虽然系统也 ...
- 配置Kestrel 网址Urls
配置Kestrel 网址Urls ASP.NET Core中如何配置Kestrel Urls呢,大家可能都知道使用UseUrls() 方法来配置. 今天给介绍全面的ASP.NET Core 配置 Ur ...
- 提交 应用ID 证书
https://developer.apple.com/account/ios/profile/profileCreate.action?formID=960914622
- Source Insight设置总结
在网上搜索了一些关于Source Insight的设置技巧,把这些结果给总结下来: 1. 背景色选择 要改变背景色Options->preference->windows backgrou ...
- Square spiral
Square spiral Nikola picks up a strange circuit board. All of its elements are connected in a spiral ...
- Php模板引擎Smarty安装和配置
Smarty 是PHP的一个模板引擎,是由Monte Ohrt 和 Andrei Zmievski 使用PHP语言开发的,发展至今已成为一个非常流行的模板引擎,Smarty 提供了一种易于管理和使用的 ...