CSS3,JS可用于刷新按钮或者加载动画的动画
html:
<input type="button" id="zidong3" style="top: 12px;" />
css:
#zidong3
{
position: absolute;
top: 7px;
right: 7px;
width: 24px;
height: 24px;
border: none;
background: #fff url(../images/refresh.png) no-repeat;
background-size: 100% 100%;
/*background-position: -1px 5px;*/
border-radius: 50%;
}
/*重点:*/
@-webkit-keyframes gira {
from{-webkit-transform: rotate(0deg);}
to{-webkit-transform: rotate(360deg);}
}
@keyframes gira {
from{-webkit-transform: rotate(0deg); transform: rotate(0deg)}
to{-webkit-transform: rotate(360deg); transform: rotate(360deg)}
}
JS:
$("#zidong3").click(function () {
$(this).css("-webkit-animation", "gira 1s ease-out 1");
$(this).css("-ms-animation", "gira 1s ease-out 1");
$(this).css("animation", "gira 1s ease-out 1");
var z = $(this);
setTimeout(function () {
$(z).css("animation", "");
}, 1000);
//getGPS();//获取位置
});
有时间说明
最新文章
- C# 实现函数回调
- Mac下升级Nodejs
- 【Java每日一题】20161027
- Tomcat:bio nio 的设计
- 网页(HTML)中的特殊字符
- python核心编程第六章练习6-12
- 使用Jsoup解析html网页
- 30天,O2O速成攻略【8.22北京站】
- [reprint]malloc与calloc的区别
- *[hackerrank]Lexicographic paths
- JavaScript版几种常见排序算法
- 【OC学习-12】什么是类的继承?为什么要继承?以及继承里面的注意事项
- Visual Studio 2013 发布正式版
- POJ1182食物链(并查集)
- iOS项目之使用开关控制日志输出的功能
- Python 基础API
- shell 文件描述符
- C#创建无窗体的应用程序
- 看见- 柴静-kindle书摘
- testNG的高级用法 --DataProvider