Answers for "animate from left to right css"

CSS
1

css animation left to right

//css code
#leftToRight{
  animation: run ease 3s;
  -webkit-animation: run ease 3s;
  -moz-animation: run ease 3s;
  -o-animation: run ease 3s;
  -ms-animation: run ease 3s;
}   

@keyframes run {
  0% { margin-left: -98%;}
  100%{ margin-left: 0%;}
}

@-moz-keyframes run {
  0% { margin-left: -98%;}
  100%{ margin-left: 0%;}
}

@-webkit-keyframes run {
  0% { margin-left: -98%;}
  100%{ margin-left: 0%;}
}

@-o-keyframes run {
  0% { margin-left: -98%;}
  100%{ margin-left: 0%;}
}

@-ms-keyframes run {
  0% { margin-left: -98%;}
  100%{ margin-left: 0%;}
}

//html code
<div id="leftToRight"></div>
Posted by: Guest on October-26-2020
0

animation left to right css

#idor.class{	
  animation: example 4s infinite
}

@keyframes example {
  0%   {background-color:red; left:0px; top:0px;}
  25%  {background-color:yellow; left:200px; top:0px;}
  50%  {background-color:blue; left:200px; top:0px;}
  100% {background-color:red; left:0px; top:0px;}
}
Posted by: Guest on November-03-2021

Browse Popular Code Answers by Language