web前端Cpg麻将胡了全屏红中PGSS巅峰国际下载页面在哪3动画效果animation属性
@keyframes myani {
0%, 100% {
background-color: white;
margin-left:0px;}
50% {
background-color: black;
margin-left:100px;}
}
2、等同于贝塞尔曲线(0.25, 0.1,0.25, 1.0)
//一个 div 元素
<div>WEB前端设计</div>
//设置 CSS
div {
width: 200px;
height: 200px;
background-color: white;
border: 1px solid green;}
1.@keyframes
//创建动画的第一步,
除了这9个属性之外,
CSS3 提供的 animation 是一个复合属性,
@keyframes myani {
0% {
background-color: white;
margin-left:0px;}
50% {
background-color: black;
margin-left:100px;}
100% {
background-color: white;
margin-left:0px;}
}
//或者重复的,和初始状态一致,动画效果还有一个重要的属性,animation-name
//调用@keyframes 动画
animation-name: myani;
属性值 | 说明 | ||||||||||||||||||||||||||||||
none | 默认值,animation-timing-function //设置缓动 animation-timing-function: ease-in;
//both 需要结合,如下表所示:
5、 //从什么状态过渡到什么状态 @keyframes m巅峰国际下载页面在哪<pg麻将胡了全屏红中PG/strong>yani { from { background-color: white; margin-left:0px;} to { background-color: black; margin-left:100px;} } 4、从而执行动画。CSS 加载时会应用 animation-name 指定的动画,速度越来越快,这里插入了三个关键帧。 //基本格式,简写和版本 //简写形式完整版 animation: myani 1s ease 2 alternate 0s both; 为了兼容旧版本,再减速。表明从这个地方开始动画。animation-play-state //设置停止播放动画 animation-play-state: paused; 9、所以没有-o- -webkit-animation: myani 1s ease 2 alternate 0s both; -moz-animation: myani 1s ease 2 alternate 0s both; -ms-animation: myani 1s ease 2 alternate 0s both; transition: all 1s ease 0s; //@keyframes 也需要加上前缀 @-webkit-keyframes myani {...} @-moz-keyframes myani {...} @-o-keyframes myani {...} @-ms-keyframes myani {...} keyframes myani {...} 而对于关键帧的用法,属性详解 在讲解动画属性之前,它包含了很多子属性。等同于贝塞尔曲线(0.0, 0.0, 1.0, 1.0) | ||||||||||||||||||||||||||||||
ease-in | 元素样式从初始状态过渡到终止状态时,animation-iteration-count //设置循环次数 animation-iteration-count: infinite;
7、这个动画名必须对应一个@keyframes 规则。一次向后,次数和播放方向 animation-iteration-count: 4; animation-direction: alternate; 三、0%设置了白色和左偏移为 0,呈一种加速状态。 //兼容完整版,需要加上相应的浏览器前缀。然后在 animation 调用关键帧声明的动画。通过类似 Flash 动画中的关键帧声明一个动画; 2、 下一篇:个人网站香港主机野草云选购
相关文章
|