keyframe compatible with css code example

Example 1: css keyframes animation

//css keyframes
#image{
	  width: 100px;
	  height: 100px;
	  background-color: red;
	  position: relative;
	  animation: monFrame 5s linear 2s infinite alternate;

	}
	@keyframes monFrame {
	  0%   {left:0px; top:0px;}
	  25%  {left:500px; top:0px;}
	  50%  {left:500px; top:500px;}
	  75%  {left:0px; top:500px;}
	  100% {left:0px; top:0px;}
     }

Example 2: @keyframes

p {
  animation-duration: 25s;
  animation-name: slidein;
}

@keyframes slidein {
  from {
    margin-left: 100%;
    width: 300%;
  }
  75% {
    font-size: 300%;
    margin-left: 25%;
    width: 150%;
  }

  to {
    margin-left: 0%;
    width: 100%;
  }
}

Tags:

Css Example