绿色植物对决僵尸手机游戏坚信大伙儿都玩过吧,那末实际完成编码大伙儿了解吗,下面网编给大伙儿共享编码,在没共享编码以前先给大伙儿展现下实际效果图:
css编码:
@charset "utf⑻";
/* CSS Document */
/* General CSS */
*{
padding:0px;
margin:0px;
}
body,html {
width:100%;
height:100%;
margin:0px;
padding:0px;
font-family: "Roboto", sans-serif;
font-size: 12px;
font-weight: 700;
}
/*DEMO CSS*/
body{
position:relative;
background: transparent url("../img/background.jpg") no-repeat scroll center top / cover;
background-attachment:fixed;
}
.zoombie {
/*Our png sprite is 2000px x 312px, then each frame is 200px x 312px*/
width: 200px;
height: 312px;
background-image: url("../img/walkingdead.png");
-webkit-animation: play 1.8s steps(10) infinite;
-moz-animation: play 1.8s steps(10) infinite;
-ms-animation: play 1.8s steps(10) infinite;
-o-animation: play 1.8s steps(10) infinite;
animation: play 1.8s steps(10) infinite ;
}
@-webkit-keyframes play {
from { background-position: 0px; }
to { background-position: ⑵000px; }
}
@-moz-keyframes play {
from { background-position: 0px; }
to { background-position: ⑵000px; }
}
@-ms-keyframes play {
from { background-position: 0px; }
to { background-position: ⑵000px; }
}
@-o-keyframes play {
from { background-position: 0px; }
to { background-position: ⑵000px; }
}
@keyframes play {
from { background-position: 0px; }
to { background-position: ⑵000px; }
}
#wrapper {
transform: translate(⑸0%, ⑸0%);
position: absolute;
top: 50%;
left: 50%;
}
以上所述是网编给大伙儿共享的CSS3+Sprite完成僵尸行走动漫殊效源代码 ,期待对大伙儿有一定的协助。