css定义多重背景动画
2015-08-14 16:10
609 查看
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> *{margin: 0; padding: 0; border: 0;} @keyframes animatedBird { from { background-position: 20px 20px, 30px 80px, 0 0; } to { background-position: 300px -90px, 30px 20px, 100% 0; } } @-webkit-keyframes animatedBird { from { background-position: 20px 20px, 30px 80px, 0 0; } to { background-position: 300px -90px, 30px 20px, 100% 0; } } @-ms-keyframes animatedBird { from { background-position: 20px 20px, 30px 80px, 0 0; } to { background-position: 300px -90px, 30px 20px, 100% 0; } } @-moz-keyframes animatedBird { from { background-position: 20px 20px, 30px 80px, 0 0; } to { background-position: 300px -90px, 30px 20px, 100% 0; } } .animate-area{ margin: 100px auto 0; width: 560px; height: 190px; background-image: url('http://static.oschina.net/uploads/space/2015/0814/152322_gbDp_2435847.png'), url('http://static.oschina.net/uploads/space/2015/0814/152322_7IfI_2435847.png'), url('http://static.oschina.net/uploads/space/2015/0814/152322_Xtfs_2435847.png'); background-position: 20px -90px, 30px 80px, 0px 0px; background-repeat: no-repeat, no-repeat, repeat-x; animation: animatedBird 4s linear infinite; -ms-animation: animatedBird 4s linear infinite; -moz-animation: animatedBird 4s linear infinite; -webkit-animation: animatedBird 4s linear infinite; overflow: hidden; } </style> </head> <body> <div class="animate-area"></div> </body> </html>
View Code
相关文章推荐
- 前端设计之CSS布局:上中下三栏自适应高度CSS布局
- CSS3边框border知识点
- CSS基础
- css3之3D翻牌效果
- 转载一篇CSS布局的博客
- CSS让整个网页成灰色
- 认识hasLayout——IE浏览器css bug的一大罪恶根源
- CSS学习笔记(3)
- CSS小技巧
- 如何使用样式
- 没学过CSS等前端的我,也想美化一下自己的博客
- 一个没什么特色的DIV+CSS布局,求指正
- DIV+CSS的文字居中问题
- CSS中Position属性
- CSS三列自适应布局
- div+css3做的小图标
- css3的Background新属性
- 普通table表格样式及代码大全(全)
- css3的Background新属性
- 用CSS实现层的垂直居中