animation-fill-mode
animation-fill-mode:
none:默认值。不设置对象动画之外的状态
forwards:结束后保持动画结束时的状态,但当animation-direction为0,则动画不执行,持续保持动画开始时的状态
backwards:结束后返回动画开始时的状态
both:结束后可遵循forwards和backwards两个规则。
css:
.demo_box{
-webkit-animation:f1 2s 0.5s 1 linear;
-moz-animation:f1 2s 0.5s 1 linear;
position:relative;
left:10px;
width:100px;
height:100px;
margin:10px 0;
overflow:hidden;
}
.forwards{
-webkit-animation-fill-mode:forwards;
-moz-animation-fill-mode:forwards;
}
.backwards{
-webkit-animation-fill-mode:backwards;
-moz-animation-fill-mode:backwards;
}
@-webkit-keyframes f1{
0%{left:10px;}
100%{left:500px;}
}
@-moz-keyframes f1{
0%{left:10px;}
100%{left:500px;}
}
html:
<div class="demo_box forwards">我留在终点</div>
<div class="demo_box backwards">我只回到原点</div>
animation-fill-mode的更多相关文章
- WPF实现斜纹圆角进度条样式
原文:WPF实现斜纹圆角进度条样式 运行效果: 进度条样式: <!--进度条样式--> <LinearGradientBrush x:Key="ProgressBar.Pr ...
- 完整学习使用CSS动画【翻译】
注:原文有较大改动 使用keyframes, animation属性,例如timing, delay, play state, animation-count, iteration count, d ...
- CSS/CSS3语法新特性笔记
CSS层叠样式表 三大特性 层叠性:相同的样式会覆盖 继承性:属性可向下继承 优先级:范围越小权重越高 选择器 基础选择器 标签选择器 1 body { 2 color:#fff; 3 } 类选择器 ...
- 虾扯蛋:Android View动画 Animation不完全解析
本文结合一些周知的概念和源码片段,对View动画的工作原理进行挖掘和分析.以下不是对源码一丝不苟的分析过程,只是以搞清楚Animation的执行过程.如何被周期性调用为目标粗略分析下相关方法的执行细节 ...
- charing animation
FHD : full high definition,1920 x 1080,全高清 vendor/mediatek/proprietary/bootable/bootloader/lk/dev/lo ...
- ArrowLayer : A coustom layer animation
Since my other answer (animating two levels of masks) has some graphics glitches, I decided to try r ...
- Swift: 深入理解Core Animation(一)
如果想在底层做一些改变,想实现一些特别的动画,这时除了学习Core Animation之外,别无选择. 最近在看<iOS Core Animation:Advanced Techniques&g ...
- WP8.1 Study3:WP8.1中Animation应用
WP8.1上的Animation动画的API和WIN8/WIN8.1上的差不多,网上可以找到很多资料,同时可以去MSDN看官方文档. 下面是我参考一些资料,写出来的例子,希望以后有用. xaml代码如 ...
- iOS Instruments之Core Animation动画性能调优(工具复选框选项介绍)
Core Animation工具用来监测Core Animation性能.它给我们提供了周期性的FPS,并且考虑到了发生在程序之外的动画(见图12.4) Core Animation工具提供了一系列复 ...
- 为什么不能在scrollview中直接添加一个image,然后使animation.begin()??
http://stackoverflow.com/questions/17267451/animation-cant-begin-in-scrollview-in-windows-phone 以上是我 ...
随机推荐
- Windows Mysql binlog 数据恢复
show variables like 'log_bin%'; 可以看到Mysql binlog为关闭状态,那我们去更改为开启状态
- vue--双向数据绑定
<template> <div id="app"> <p>{{msg}}</p> <input v-model="m ...
- Linux--netstat命令
netstat:显示网络状态 语法定义:netstat [-acCeFghilMnNoprstuvVwx] [-A<网络类型>][--ip] 参数说明: -a 或 -all :显示所有连线 ...
- myeclipse乱码/GBK只支持中文
Windows>>Pereferences>>General>Editors>>Spelling>>Encoding选项下选择other,然后输入 ...
- 【紫书】【重要】Abbott's Revenge UVA - 816 bfs 复杂模拟 带方向参数的迷宫
题意:一个迷宫,每个交叉路口有一路标,限制了你从某方向进入该路口所能进入的路口. 题解:1.对于方向的处理:将node多增加一维dir,通过一个const 字符数组 加 上dir_id函数 以及一个方 ...
- 安装JIRA
参考链接:https://www.cnblogs.com/houchaoying/p/9096118.html mysql-connector插件下载: https://mvnrepository.c ...
- 小希的迷宫---hdu1272
http://acm.hdu.edu.cn/showproblem.php?pid=1272 #include<stdio.h> #include<string.h> #inc ...
- 解决eslint空格报错等问题
eslint检查代码风格是好的,不过 有些换行报错 空格报错 还有在代码中有 console也是报错 这有些烦人 为了把这些烦人的报错给禁止掉 我们可以在package.json文件中 找到 ...
- 洛谷P3806 点分治1 & POJ1741 Tree & CF161D Distance in Tree
正解:点分治 解题报告: 传送门1! 传送门2! 传送门3! 点分治板子有点多,,,分开写题解的话就显得很空旷,不写又不太好毕竟初学还是要多写下题解便于理解 于是灵巧发挥压行选手习惯,开始压题解(bu ...
- PULL解析学习
学习过程 安卓中有三种对XML解析的方式,这个众所周知,DOM,SAX,PULL 其中被推荐的方法是PULL,说是非常简单,但从一开始接触就觉得比较迷惑,总是云里雾里的感觉,甚至在自己写出了一个能 ...