找到 1575 篇文章 关于 CSS
733 次浏览
使用 `animation-timing-function` 属性和 `ease-out` 值来使用 CSS 设置动画,使其结尾缓慢示例在线演示 div { width: 150px; height: 200px; position: relative; background-color: #808000; animation-name: myanim; animation-duration: 2s; animation-direction: alternate-reverse; animation-iteration-count: 3; } @keyframes myanim { from {left: 100px;} to {left: 200px;} } #demo {animation-timing-function: ease-out;} ease-out 效果
221 次浏览
使用 `animation-timing-function` 属性和 `linear` 值来使用 CSS 设置动画,使其从开始到结束速度相同示例在线演示 div { width: 150px; height: 200px; position: relative; background-color: yellow; animation-name: myanim; animation-duration: 2s; animation-direction: alternate-reverse; animation-iteration-count: 3; } @keyframes myanim { from {left: 100px;} to {left: 200px;} } #demo {animation-timing-function: linear;} linear 效果
91 次浏览
使用 `animation-direction` 属性来设置动画是向前播放、向后播放还是交替循环播放:示例在线演示 div { width: 150px; height: 200px; background-color: yellow; animation-name: myanim; animation-duration: 2s; animation-direction: reverse; } @keyframes myanim { from { background-color: green; } to { background-color: blue; } }