>  기사  >  웹 프론트엔드  >  css定义多重背景动画_html/css_WEB-ITnose

css定义多重背景动画_html/css_WEB-ITnose

WBOY
WBOY원래의
2016-06-24 11:38:461074검색

<!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>

 

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.