.pacman {
    margin: 40px 10px;
    position: relative;
}

.pacman-top {
    background-color:yellow;
    height:100px;
    width:200px;
    border-radius:100px 100px 0 0;
    animation: spin1 0.5s infinite linear;
    text-align: center;
    line-height: 60px;
    font-size: 1.2em;
    font-weight: bold;
    z-index: 2;
}

.pacman-bottom {
    background-color:yellow;
    height:100px;
    width:200px;
    border-radius:0 0 100px 100px;
    animation: spin2 0.5s infinite linear;
    z-index: 2;
}

.eatmage {
    background-image: url("./pacmanbg.jpg");
    width: 1225px;
    height: 80px;
    left: 100px;
    top: 60px;
    position: absolute;
    -moz-animation: eat1 10s linear 0s infinite;
    -webkit-animation: eat1 10s linear 0s infinite;
    animation: eat1 10s linear 0s infinite;
    z-index: 1;
}

/* Animation*/

@keyframes spin1 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(-35deg);}
    
}
@keyframes spin2 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(35deg);}	
}

@-moz-keyframes spin1 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(-35deg);}
    
}
@-moz-keyframes spin2 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(35deg);}	
}

@-webkit-keyframes spin1 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(-35deg);}
    
}
@-webkit-keyframes spin2 {
    0%  {transform: rotate(0deg);}
    50%{transform: rotate(35deg);}	
}

@keyframes eat1 {
    0% { background-position: 1225px 100px; }
    100% { background-position: 0px 100px; }
}

