CSS3动画使用方法实例

来源:互联网 发布:阿里数据平台概念 编辑:程序博客网 时间:2024/06/01 14:30
<!DOCTYPE html><html><head><style> div{    width:100px;    height:100px;    background:red;    position:relative;    animation:go 1s infinite;    -moz-animation:go 1s infinite; /* Firefox */    -webkit-animation:go 1s infinite; /* Safari and Chrome */    -o-animation:go 1s infinite; /* Opera */    animation-direction: alternate;}@keyframes go{    0% {left:0px;}    100% {left:200px;}}@-moz-keyframes go /* Firefox */{    0% {left:0px;}    100% {left:200px;}}@-webkit-keyframes go /* Safari and Chrome */{    0% {left:0px;}    100% {left:200px;}}@-o-keyframes go /* Opera */{    0% {left:0px;}    to {left:200px;}}</style></head><body><div></div></body></html>
1 0
原创粉丝点击