css3动画
来源:互联网 发布:ubuntu软件无图标 编辑:程序博客网 时间:2024/05/16 06:58
transform变换
transform: translate(30px,30px); //相对当前位置进行移动
transform: rotate(30deg); //旋转指定角度
transform: rotateX(30deg); //围绕x轴进行旋转,X可替换为Y,Z
transfrom: scale(3,3); //按参数缩放长宽,为负数时上下颠倒
transition过渡效果
transition: width 2s ease 1s; //四个参数,前两个必须
①transition-property:width //指定会变换的元素
②transition-duration: //变换时间
③transition-timing-funciton: //时间变化曲线,默认linear
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 //控制暂停播放
transform: translate(30px,30px); //相对当前位置进行移动
transform: rotate(30deg); //旋转指定角度
transform: rotateX(30deg); //围绕x轴进行旋转,X可替换为Y,Z
transfrom: scale(3,3); //按参数缩放长宽,为负数时上下颠倒
transform: skew(30deg,30deg); //对图像进行斜切
transform-origin:center center -50px; //旋转原点
transform-style:perserve-3d; //子元素显示3d效果
backfaceVisibility:hidden;//当元素旋转至背面时不显示
perspective:100px;//定义观察元素的距离,增加立体感。
transition过渡效果
transition: width 2s ease 1s; //四个参数,前两个必须
①transition-property:width //指定会变换的元素
②transition-duration: //变换时间
③transition-timing-funciton: //时间变化曲线,默认linear
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动画
- css3动画
- CSS3动画
- css3.动画
- CSS3动画
- CSS3动画
- CSS3动画
- css3-动画
- CSS3动画
- css3动画
- css3动画
- CSS3 动画
- CSS3动画
- CSS3动画
- css3-动画
- Spring中,applicationContext.xml 配置文件在web.xml中的配置详解
- 算法爱好者——分糖果 ? 待解决
- SpringBoot(一)
- JPA中的@Version
- 如何在生产环境禁用Swagger
- css3动画
- Java基础 —— 根据 Key 或是 Value 对 Map 进行排序
- 11.25学习计划
- 算法爱好者——摆动排序 ? 待解决
- [NOIP TG]来自一个打崩的分数比得的分数都高的蒟蒻的怨念
- 在有序但含有空的数组中查找字符串
- Struts2架包的下载
- PHP 底层的运行机制与原理解析
- Java设计模式之代理模式(1)