纯css抖动效果
HTML:
<button class="shake">按钮</button>
CSS:
.shake{
width: 120px;
height: 33px;
border-radius: 66px;
background-color: #00ff00;
border:;
color: #fff;
font-weight: bold;
}
/* shake 按钮抖动 */
.shake:hover {
-webkit-animation-name: shake-slow;
-ms-animation-name: shake-slow;
animation-name: shake-slow;
-webkit-animation-duration: 5s;
-ms-animation-duration: 5s;
animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
-ms-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-timing-function: ease-in-out;
-ms-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-delay: 0s;
-ms-animation-delay: 0s;
animation-delay: 0s;
-webkit-animation-play-state: running;
-ms-animation-play-state: running;
animation-play-state: running;
}
@-webkit-keyframes shake-slow {
0% {
-webkit-transform: translate(0px, 0px) rotate(0deg);
}
2% {
-webkit-transform: translate(-1px, 8px) rotate(1.5deg);
}
4% {
-webkit-transform: translate(7px, 0px) rotate(-0.5deg);
}
6% {
-webkit-transform: translate(8px, 8px) rotate(-3.5deg);
}
8% {
-webkit-transform: translate(-4px, -3px) rotate(-1.5deg);
}
10% {
-webkit-transform: translate(5px, 0px) rotate(-2.5deg);
}
12% {
-webkit-transform: translate(-10px, -3px) rotate(-3.5deg);
}
14% {
-webkit-transform: translate(5px, 7px) rotate(2.5deg);
}
16% {
-webkit-transform: translate(8px, -8px) rotate(-1.5deg);
}
18% {
-webkit-transform: translate(9px, -6px) rotate(-3.5deg);
}
20% {
-webkit-transform: translate(3px, 1px) rotate(-0.5deg);
}
22% {
-webkit-transform: translate(6px, 8px) rotate(-2.5deg);
}
24% {
-webkit-transform: translate(-8px, -1px) rotate(2.5deg);
}
26% {
-webkit-transform: translate(7px, -10px) rotate(0.5deg);
}
28% {
-webkit-transform: translate(7px, -4px) rotate(-3.5deg);
}
30% {
-webkit-transform: translate(-2px, -6px) rotate(-1.5deg);
}
32% {
-webkit-transform: translate(-1px, 0px) rotate(2.5deg);
}
34% {
-webkit-transform: translate(6px, 2px) rotate(-0.5deg);
}
36% {
-webkit-transform: translate(2px, 7px) rotate(1.5deg);
}
38% {
-webkit-transform: translate(2px, -9px) rotate(1.5deg);
}
40% {
-webkit-transform: translate(-5px, -1px) rotate(-0.5deg);
}
42% {
-webkit-transform: translate(-8px, 2px) rotate(-0.5deg);
}
44% {
-webkit-transform: translate(-4px, 3px) rotate(0.5deg);
}
46% {
-webkit-transform: translate(-10px, -2px) rotate(-0.5deg);
}
48% {
-webkit-transform: translate(1px, 9px) rotate(1.5deg);
}
50% {
-webkit-transform: translate(6px, 7px) rotate(1.5deg);
}
52% {
-webkit-transform: translate(-8px, 4px) rotate(0.5deg);
}
54% {
-webkit-transform: translate(6px, -8px) rotate(-2.5deg);
}
56% {
-webkit-transform: translate(2px, -9px) rotate(-2.5deg);
}
58% {
-webkit-transform: translate(-2px, -9px) rotate(0.5deg);
}
60% {
-webkit-transform: translate(2px, 7px) rotate(-0.5deg);
}
62% {
-webkit-transform: translate(0px, 0px) rotate(-1.5deg);
}
64% {
-webkit-transform: translate(-9px, -4px) rotate(-3.5deg);
}
66% {
-webkit-transform: translate(6px, -6px) rotate(0.5deg);
}
68% {
-webkit-transform: translate(0px, -7px) rotate(-2.5deg);
}
70% {
-webkit-transform: translate(-10px, 1px) rotate(1.5deg);
}
72% {
-webkit-transform: translate(-7px, 9px) rotate(2.5deg);
}
74% {
-webkit-transform: translate(2px, -6px) rotate(-0.5deg);
}
76% {
-webkit-transform: translate(5px, 1px) rotate(-0.5deg);
}
78% {
-webkit-transform: translate(-1px, 5px) rotate(2.5deg);
}
80% {
-webkit-transform: translate(3px, 7px) rotate(2.5deg);
}
82% {
-webkit-transform: translate(-6px, -7px) rotate(-0.5deg);
}
84% {
-webkit-transform: translate(-8px, 8px) rotate(-2.5deg);
}
86% {
-webkit-transform: translate(8px, 3px) rotate(-2.5deg);
}
88% {
-webkit-transform: translate(-8px, 3px) rotate(-1.5deg);
}
90% {
-webkit-transform: translate(-7px, -4px) rotate(-3.5deg);
}
92% {
-webkit-transform: translate(-8px, 4px) rotate(2.5deg);
}
94% {
-webkit-transform: translate(-6px, -6px) rotate(-3.5deg);
}
96% {
-webkit-transform: translate(-3px, 2px) rotate(-3.5deg);
}
98% {
-webkit-transform: translate(2px, 1px) rotate(-0.5deg);
}
}
@-ms-keyframes shake-slow {
0% {
-ms-transform: translate(0px, 0px) rotate(0deg);
}
2% {
-ms-transform: translate(-9px, 1px) rotate(-1.5deg);
}
4% {
-ms-transform: translate(-10px, -1px) rotate(-3.5deg);
}
6% {
-ms-transform: translate(6px, 2px) rotate(-1.5deg);
}
8% {
-ms-transform: translate(-3px, -6px) rotate(-1.5deg);
}
10% {
-ms-transform: translate(-10px, -3px) rotate(-0.5deg);
}
12% {
-ms-transform: translate(-8px, 6px) rotate(-2.5deg);
}
14% {
-ms-transform: translate(7px, 5px) rotate(-1.5deg);
}
16% {
-ms-transform: translate(2px, 2px) rotate(1.5deg);
}
18% {
-ms-transform: translate(8px, -2px) rotate(-3.5deg);
}
20% {
-ms-transform: translate(-9px, 3px) rotate(-3.5deg);
}
22% {
-ms-transform: translate(8px, -4px) rotate(-1.5deg);
}
24% {
-ms-transform: translate(-1px, -7px) rotate(2.5deg);
}
26% {
-ms-transform: translate(9px, 9px) rotate(-0.5deg);
}
28% {
-ms-transform: translate(9px, -4px) rotate(-3.5deg);
}
30% {
-ms-transform: translate(6px, -7px) rotate(-0.5deg);
}
32% {
-ms-transform: translate(9px, 2px) rotate(1.5deg);
}
34% {
-ms-transform: translate(3px, -9px) rotate(2.5deg);
}
36% {
-ms-transform: translate(-6px, -4px) rotate(2.5deg);
}
38% {
-ms-transform: translate(-5px, -9px) rotate(0.5deg);
}
40% {
-ms-transform: translate(6px, 9px) rotate(-2.5deg);
}
42% {
-ms-transform: translate(5px, -5px) rotate(0.5deg);
}
44% {
-ms-transform: translate(8px, 5px) rotate(-3.5deg);
}
46% {
-ms-transform: translate(-2px, 9px) rotate(1.5deg);
}
48% {
-ms-transform: translate(-10px, -5px) rotate(-2.5deg);
}
50% {
-ms-transform: translate(8px, -1px) rotate(-3.5deg);
}
52% {
-ms-transform: translate(-5px, -7px) rotate(2.5deg);
}
54% {
-ms-transform: translate(7px, 0px) rotate(2.5deg);
}
56% {
-ms-transform: translate(-5px, -1px) rotate(-0.5deg);
}
58% {
-ms-transform: translate(0px, -4px) rotate(-3.5deg);
}
60% {
-ms-transform: translate(-10px, 2px) rotate(2.5deg);
}
62% {
-ms-transform: translate(9px, 8px) rotate(0.5deg);
}
64% {
-ms-transform: translate(-4px, -4px) rotate(-1.5deg);
}
66% {
-ms-transform: translate(-1px, -9px) rotate(-0.5deg);
}
68% {
-ms-transform: translate(-6px, -9px) rotate(-2.5deg);
}
70% {
-ms-transform: translate(-6px, -8px) rotate(-1.5deg);
}
72% {
-ms-transform: translate(-2px, -3px) rotate(-2.5deg);
}
74% {
-ms-transform: translate(-8px, 1px) rotate(-0.5deg);
}
76% {
-ms-transform: translate(-7px, 7px) rotate(2.5deg);
}
78% {
-ms-transform: translate(7px, 2px) rotate(-3.5deg);
}
80% {
-ms-transform: translate(-10px, -4px) rotate(-0.5deg);
}
82% {
-ms-transform: translate(2px, -9px) rotate(1.5deg);
}
84% {
-ms-transform: translate(3px, 5px) rotate(1.5deg);
}
86% {
-ms-transform: translate(5px, 2px) rotate(2.5deg);
}
88% {
-ms-transform: translate(-5px, -1px) rotate(-1.5deg);
}
90% {
-ms-transform: translate(-1px, -9px) rotate(1.5deg);
}
92% {
-ms-transform: translate(8px, -6px) rotate(-3.5deg);
}
94% {
-ms-transform: translate(7px, -9px) rotate(-2.5deg);
}
96% {
-ms-transform: translate(4px, -5px) rotate(2.5deg);
}
98% {
-ms-transform: translate(8px, 0px) rotate(-3.5deg);
}
}
@keyframes shake-slow {
0% {
transform: translate(0px, 0px) rotate(0deg);
}
2% {
transform: translate(-6px, -8px) rotate(2.5deg);
}
4% {
transform: translate(3px, -9px) rotate(-0.5deg);
}
6% {
transform: translate(3px, -8px) rotate(2.5deg);
}
8% {
transform: translate(0px, 5px) rotate(0.5deg);
}
10% {
transform: translate(3px, 2px) rotate(0.5deg);
}
12% {
transform: translate(8px, 0px) rotate(0.5deg);
}
14% {
transform: translate(4px, 7px) rotate(-3.5deg);
}
16% {
transform: translate(-4px, 0px) rotate(-0.5deg);
}
18% {
transform: translate(1px, 3px) rotate(-1.5deg);
}
20% {
transform: translate(-8px, -1px) rotate(-3.5deg);
}
22% {
transform: translate(5px, 9px) rotate(2.5deg);
}
24% {
transform: translate(-9px, -10px) rotate(-2.5deg);
}
26% {
transform: translate(0px, 7px) rotate(-1.5deg);
}
28% {
transform: translate(-10px, 7px) rotate(2.5deg);
}
30% {
transform: translate(8px, -7px) rotate(-1.5deg);
}
32% {
transform: translate(0px, -8px) rotate(-0.5deg);
}
34% {
transform: translate(9px, 7px) rotate(-0.5deg);
}
36% {
transform: translate(-7px, 6px) rotate(0.5deg);
}
38% {
transform: translate(8px, -10px) rotate(-0.5deg);
}
40% {
transform: translate(8px, 0px) rotate(0.5deg);
}
42% {
transform: translate(0px, -2px) rotate(1.5deg);
}
44% {
transform: translate(5px, -2px) rotate(-0.5deg);
}
46% {
transform: translate(1px, -10px) rotate(-2.5deg);
}
48% {
transform: translate(4px, -1px) rotate(2.5deg);
}
50% {
transform: translate(-5px, -4px) rotate(2.5deg);
}
52% {
transform: translate(3px, 2px) rotate(-3.5deg);
}
54% {
transform: translate(1px, -6px) rotate(-0.5deg);
}
56% {
transform: translate(-3px, -4px) rotate(-0.5deg);
}
58% {
transform: translate(-10px, -10px) rotate(2.5deg);
}
60% {
transform: translate(8px, 7px) rotate(-3.5deg);
}
62% {
transform: translate(9px, -6px) rotate(-3.5deg);
}
64% {
transform: translate(-5px, 8px) rotate(-0.5deg);
}
66% {
transform: translate(1px, -3px) rotate(0.5deg);
}
68% {
transform: translate(-6px, 9px) rotate(1.5deg);
}
70% {
transform: translate(-5px, 8px) rotate(-1.5deg);
}
72% {
transform: translate(-10px, -2px) rotate(2.5deg);
}
74% {
transform: translate(0px, -4px) rotate(1.5deg);
}
76% {
transform: translate(-2px, -5px) rotate(0.5deg);
}
78% {
transform: translate(-2px, 9px) rotate(-3.5deg);
}
80% {
transform: translate(7px, 4px) rotate(-3.5deg);
}
82% {
transform: translate(-1px, -4px) rotate(-1.5deg);
}
84% {
transform: translate(3px, -6px) rotate(0.5deg);
}
86% {
transform: translate(7px, -8px) rotate(-1.5deg);
}
88% {
transform: translate(4px, -9px) rotate(1.5deg);
}
90% {
transform: translate(1px, -6px) rotate(2.5deg);
}
92% {
transform: translate(-8px, -1px) rotate(-1.5deg);
}
94% {
transform: translate(-4px, -1px) rotate(0.5deg);
}
96% {
transform: translate(-6px, 9px) rotate(1.5deg);
}
98% {
transform: translate(7px, 4px) rotate(-0.5deg);
}
}
快点开我!
展示:

纯css抖动效果的更多相关文章
- CSS Shake – 摇摆摇摆!动感的 CSS 抖动效果
CSS Shake 是一套 CSS3 动画特效,让页面的 DOM 元素实现各种效果的抖动(Shake),这些效果可以轻松的被应用到按钮.LOGO 以及图片等元素.所有这些效果都是只需要单一的标签,加上 ...
- 纯CSS滑动效果
原文地址:Pure CSS Slide Up and Slide Down 示例地址:Pure CSS Slide Demo 原文日期: 2013年08月26日 翻译日期: 2013年08月27日 如 ...
- 纯CSS手风琴效果
CSS手风琴效果 主体代码如下: ...
- 发光加载环动画-纯CSS动画效果-如何创建CSS3旋转预加载器(参照https://www.bilibili.com/video/BV1V4411C7z5?from=search&seid=9741275927942612817)
//css部分 body{ margin:; padding:; background: #262626; } .ring{ position: absolute; top:50%; left: 50 ...
- 纯CSS气泡效果
http://www.liaoxuefeng.com/article/0013738937970388b6b6e5e5e2f4e21b65b01807c84ddf6000
- 纯css提示效果 提示层
<!DOCTYPE HTML PUBLIC "-//W3C//DTD xHTML 1.0 Transitional//EN"><HTML> <HEAD ...
- 利用animation和text-shadow纯CSS实现loading点点点的效果
经常在网上看到loading状态时的点点点的动态效果,自己也用JS写了一个,思路是使用一个计数参数,然后在需要添加点的元素后面利用setInterval一个一个加点,当计数到3时,把点变为一个--写完 ...
- 纯CSS完成tab实现5种不同切换对应内容效果
很常用的一款特效纯CSS完成tab实现5种不同切换对应内容效果 实例预览 下载地址 实例代码 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ...
- 利用target的特性,可以实现纯css的tab效果切换
基础知识: :target起作用的是href连接到的位置 如 <a href="#tab1">tab1</a> <div id="tab1& ...
随机推荐
- [转]kaldi中的在线识别----Online Recognizers
转自: http://blog.csdn.net/wbgxx333/article/details/24932533 本文是kaldi学习联盟中@冒顿翻译的,下面是@冒顿的翻译结果,在这里感谢@冒顿的 ...
- LCA(最近公共祖先)——Tarjan
什么是最近公共祖先? 在一棵没有环的树上,每个节点肯定有其父亲节点和祖先节点,而最近公共祖先,就是两个节点在这棵树上深度最大的公共的祖先节点. 换句话说,就是两个点在这棵树上距离最近的公共祖先节点. ...
- 用Nginx搭建IIS集群实现负载均衡
长话短说,我们用Nginx来搭建一个简单的集群,实现Web应用的负载均衡,架构图如下: 两台Web服务器,一台静态资源服务器,因为是演示,我们以网站形式部署在本机IIS中 一台Nginx代理服务器,安 ...
- 【LeetCode】7. 整数反转python3
题目 给出一个 32 位的有符号整数,你需要将这个整数中每位上的数字进行反转. 示例 1:输入: 123 输出: 321 示例 2:输入: -123 输出: -321 示例 3:输入: 120 输出 ...
- github相关指令学习
正在廖雪峰官网学习关于git的相关知识,已经不是第一次来学习,但是忘得太快,索性这次边学边记录笔记,加深记忆,方便后期查看 1.找到一个合适的地方,鼠标右键 Git Bush Here ,新建文件夹, ...
- OpenStack 单元测试
OpenStack 单元测试 OpenStack开发——单元测试 本文将介绍OpenStack单元测试的部分.本文将重点讲述Python和OpenStack中的单元测试的生态环境. openstack ...
- php 对数组按照字符串长度排序
$file = file('zong.txt'); usort($file, 'sortByLen'); $handle = fopen('zong2.txt', 'a'); foreach ($fi ...
- spring boot整合reids 然后实现缓存分页(方法之一) 以及RedisTemplate存到reids 里面get 就消失的坑
业务需求 首页 实现缓存分页 spring boot 整合redis (我的是2.0.3版本的) 在pom 文件写上依赖包即可 <dependency><!--依赖包--> ...
- 一篇迟到的gulp文章,代码合并压缩,less编译
前言 这篇文章本应该在去年17年写的,但因为种种原因没有写,其实主要是因为懒(捂脸).gulp出来的时间已经很早了,16年的时候还很流行,到17年就被webpack 碾压下去了,不过由于本人接触gul ...
- JavaWeb学习 (二十七)————监听器(Listener)在开发中的应用
监听器在JavaWeb开发中用得比较多,下面说一下监听器(Listener)在开发中的常见应用 一.统计当前在线人数 在JavaWeb应用开发中,有时候我们需要统计当前在线的用户数,此时就可以使用监听 ...