Answers for "animation properties css"

CSS
15

css animation

<style>
@keyframes animatename{
  0%{
    transform: translateY(3px);
  }
  100%{
    transform: translateY(-3px);
  }
}
.my-div{
  animation: animatename 1s linear infinite;
  /* animation shorthand */
  animation: animation-name animation-duration animation-direction animation-iteration-count
}
</style>
Posted by: Guest on June-14-2021
20

css animation

<style>
.my-element {
  width: 100%;
  height: 100%;
  animation: tween-color 5s infinite;
}

@keyframes tween-color {
  0% {
    background-color: red;
  }
  50% {
    background-color: green;
  }
  100% {
    background-color: red;
  }
}

html,
body {
  height: 100%;
}
<style>

<body>
	<div class="my-element"></div>
</body>
Posted by: Guest on May-09-2020
2

animation shorthand css

animation: name time func delay iteration dir fill play;
animation: none 0s ease 0s 1 normal none running;
Posted by: Guest on May-24-2020
0

animation properties css

body{
background-color: purple;
}

@keyframes party{
    0% {background-color: red;}
    10% {background-color: orange;}
    20% {background-color: yellow;}
    30% {background-color: green;}
    40% {background-color: blue;}
    50% {background-color: purple;} 
}

@-webkit-keyframes party{
    0% {background-color: red;}
    10% {background-color: orange;}
    20% {background-color: yellow;}
    30% {background-color: green;}
    40% {background-color: blue;}
    50% {background-color: purple;} 
}
Posted by: Guest on May-13-2021
0

animation properties css

function party(){
  document.body.style.animation = 'party 2.5s infinite linear';
}
Posted by: Guest on May-13-2021
-1

animation properties css

<html>
  <body id="bd">
    <button onclick="party()">Press Me!</button>
  </body>


</html>
Posted by: Guest on May-13-2021

Browse Popular Code Answers by Language