Answers for "animate with css"

CSS
0

adding animation to images css

basic animation drop

//drop is variable named for the animation

@keyframes drop {
	0% {
		opacity: 0;
		transform: translateY(-80px);
	}
	100% {
		opacity: 1;
		transform: translateY(0px);
	}
}

img {
animation: drop 500ms ease;
}
Posted by: Guest on October-18-2020
2

animate.css

<link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
Posted by: Guest on July-14-2021
1

animate.css

//add it directly to your webpage using a CDN:

<head>
  <link
    rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
  />
</head>
Posted by: Guest on November-10-2021
2

how to animate in css

<style>
.myclass{
  background:red; /*DEFAULT VALUE*/
  animation:colorchange 1s; /*ANIMATION PROPERTY [animation name, time duration]*/
}
@keyframes colorchange{
  from{background:red} /*DEFAULT VALUE*/
  to{background:blue} /*CHANGING VALUE*/
}
</style>
<body>
<div class="myclass"> ELEMENT </div>
</body>
Posted by: Guest on March-30-2021
8

css animation

<style>

  #ball {
    width: 100px;
    height: 100px;
    margin: 50px auto;
    position: relative;
    border-radius: 50%;
    background: linear-gradient(
      35deg,
      #ccffff,
      #ffcccc
    );
    /*"Call" the animation "function" */
    animation-name: bounce;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-delay: 2s;
    /* Normal, reverse, alternate(between the fwd and back) 
    and alternate-reverse */
    animation-direction: reverse; 
    /* Ease is deafault, use cubic-bezier(n,n,n,n) for custom */
    animation-timing-function: linear; 
    
    /* if you want something to display from hidden
       set the opacity to 0 and in the keyframe steps bring
   	   the opacity to 1 gradually to stop it flashing */
  }
	
  /* The animation "bounce" */
  @keyframes bounce{
    /* start */
    0% {
      top: 0px;
    }
    /* step (you can add multiple incremental steps from 1-100) */
    50% {
      top: 249px;
      width: 130px;
      height: 90px;
    }
    /* end (you can count down from 100 to 0 too) */
    100% {
      top: 0px;
    }
  }
</style>

<div id="ball"></div>
Posted by: Guest on April-05-2020
6

animate.css

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css" />
Posted by: Guest on November-30-2020

Browse Popular Code Answers by Language