css3的animation-play-state属性实现GIF图的暂停与播放
来源:互联网 发布:win7仿苹果mac os x 编辑:程序博客网 时间:2024/05/14 15:26
.firework { display: block; width: 100px; height: 100px; background: url(web_firework_animation.png) 0 0 no-repeat; background-size: 200%; animation: heart-burst steps(28) 0.9s infinite both;}.stop { animation-play-state: paused;}@keyframes heart-burst { 0% { background-position: 0%; } 100% { background-position: 100%; }}
var image = document.getElementById("testImg"), button = document.getElementById("testBtn"); if (image.classList && image && button) { button.onclick = function() { if (this.value == '暂停') { image.classList.add('stop'); this.value = '播放'; } else { image.classList.remove('stop'); this.value = '暂停'; } };}
<i id="testImg" class="firework "></i><p><input type="button" id="testBtn" value="暂停"></p>
阅读全文
0 0
- css3的animation-play-state属性实现GIF图的暂停与播放
- css3常用属性animation-play-state的使用技巧
- Android 动图 WebP Gif 的 播放 和 暂停
- ios gif 暂停与播放
- CSS3的新属性animation
- HTML5基础加强css样式篇(animation填充属性:animation-fill-mode,播放控制属性:animation-play-state,播放顺序设置,)(三十一)
- 纯CSS3属性animation实现的打字效果
- 背景音乐的暂停与播放
- unity3d animator state play once 播放一次的研究
- 如何实现平移动画的暂停与播放?
- 纯 CSS 方式实现 CSS 动画的暂停与播放
- GIF图的播放
- 关于Gif播放的实现
- css3动画的暂停与运行
- CSS3中animation属性的使用
- CSS3动画属性animation的基本用法
- CSS3 动画Animation的8大属性
- CSS3 动画属性 animation 的基本用法
- 欢迎使用CSDN-markdown编辑器
- android 软键盘挡住输入内容,adjustResize设置了也无效
- hdu 6078(1012)
- 错误:php70w-common conflicts with php-common-5.3.3-49.el6.x86_64 You could try using --skip-broken to
- Codeforces Round #260 (Div. 1) 455 A. Boredom (DP)
- css3的animation-play-state属性实现GIF图的暂停与播放
- 全局变量的作用范围和顺序
- 【Linux】Shell 编写case in 语句
- 文件上传下载
- 面向对象图形讲解
- GCD栅栏
- 【数据库系统概念】第7章 数据库设计和E-R模型 知识总结
- Agglomerative Hierarchical Clustering(AHC)
- Android 测试