#game{
    width: 500px;
    height: 200px;
    border: 1px solid black;
    margin: auto;
}
#character{
    width: 20px;
    height: 50px;
    background-color: red;
    position: relative;
    top: 150px;
}
@keyframes jump{
    0%{top: 150px;}
    30%{top: 100px;}
    70%{top: 100px;}
    100%{top: 150px;}
}
.animate{
    animation: jump 300ms linear;
}