搜索文档
首页
HTML/CSS
JavaScript
服务端开发
Java教程
移动端
数据库
当前位置:
首页
HTML/CSS
CSS 参考手册
CSS 属性大全
源代码
清空
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Example of CSS3 animation-timing-function 属性- 基础教程(div.cn)</title> <style> .box { width: 153px; height: 103px; margin: 50px; background: url("/run/images/tortoise-transparent.png") no-repeat; position: relative; /* Chrome, Safari, Opera */ -webkit-animation-name: moveit; -webkit-animation-duration: 2s; -webkit-animation-timing-function: ease-in; /* Standard syntax */ animation-name: moveit; animation-duration: 2s; animation-timing-function: ease-in; } /* Chrome, Safari, Opera */ @-webkit-keyframes moveit { from {left: 0;} to {left: 50%;} } /* Standard syntax */ @keyframes moveit { from {left: 0;} to {left: 50%;} } </style> </head> <body> <div class="box"></div> <p><strong>Note:</strong>点击“运行”按钮,重复动画.</p> </body> </html>
运行结果