css3动效
来源:互联网 发布:日本it行业知乎 编辑:程序博客网 时间:2024/05/16 01:23
transform变换
transform: translate(30px,30px); //相对当前位置进行移动transform: rotate(30deg); //旋转指定角度
transform: rotateX(30deg); //围绕x轴进行旋转,X可替换为Y,Z
transfrom: scale(3,3); //按参数缩放长宽,为负数时上下颠倒
transform: skew(30deg,30deg); //对图像进行斜切
perspective:100px; //透视距离
transform-origin:top bottom 50px; //旋转中心点,可传入数值,相对于左上角,第三个参数若不设置则为2d旋转。
transition过渡效果
transition: width 2s ease 1s; //四个参数,前两个必须①transition-property:width //指定会变换的元素
②transition-duration: //变换时间
③transition-timing-funciton: //时间变化曲线,默认ease
linear:线性 ease:由慢到快再到慢 ease-in:慢开始 ease-in-out:慢结束
④transition-delay: //效果延迟
@Keyframes动画
Keyframe定义@Keyframes kname{
from {css样式}
to {css样式}
}
@keyframes kname
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
100% {background: green;}
}
Keyframe使用:
div{
animate: kname 5s;
}
详细参数:animation-name//动画名 animation-duration//动画持续时间 animation-timing-function//动画时间速度曲线,同transition
animation-delay//延迟时间 animation-iteration-count//播放次数
animation-direction//{ normal|reverse|alternate|alternate-reverse|initial|inherit }
reverse:反向播放 alternate//奇数次正向播放,偶数反向播放 alternate-reverse//相反
animation-play-state: paused|running //控制暂停播放
阅读全文
0 0
- css3动效
- 纯CSS3实现动画旋转动效
- CSS3 元素上下动
- CSS3 SVG 构建的白炽灯悬停控制动效
- 动效,动效
- 用CSS3动画,让页面动起来
- css3-定时缓动效果与块旋转
- 继续学习-CSS3页面美化之让页面动起来
- 看下你名字炫不炫(CSS3)---知道动哦
- android动效开篇
- android动效开篇
- android动效开篇
- IOS动效设计
- 动效设计整理
- 动效设计整理
- ios 动效
- UIDynamic 物理动效
- css动效学习
- Spark 常用算子
- springMVC报出400,The request sent by the client was syntactically incorrect.
- 链式调用
- C# 高级编程 继承
- 数据库事务的四大特性以及事务的隔离级别
- css3动效
- 揭秘套路:百度贴吧诱导用户操作CPA项目
- MongoDB 安装和可视化工具
- 成员函数的重载、覆盖和隐藏
- OpenGL 基础2
- DTO,BO, PO之间的转换可以用这个框架;java 对象转换
- Spark 中算子功能与分类介绍
- cookie和session区别
- python3 web接口调用——Forbidden (CSRF cookie not set.): xxx