Questions tagged [css-animations]

CSS animations make it possible to animate transitions from one CSS style configuration to another. CSS module describes a way for authors to animate the values of CSS properties over time, using keyframes. The behavior of these keyframe animations can be controlled by specifying their duration, number of repeats, and repeating behavior.

CSS animations make it possible to animate transitions from one CSS style configuration to another. Animations consist of two components, a style describing the CSS animation and a set of keyframes that indicate the start and end states of the animation's style, as well as possible intermediate waypoints.

Properties

  • animation-delay

  • animation-direction

  • animation-duration

  • animation-iteration-count

  • animation-name

  • animation-play-state

  • animation-timing-function

  • animation-fill-mode

Animations are similar to in that they change the presentational value of CSS properties over time. The principal difference is that while transitions trigger implicitly when property values change, animations are explicitly executed when the animation properties are applied.

Example

p {
  animation-duration: 3s;
  animation-name: slidein;
}
@keyframes slidein {
  from {
    margin-left: 100%;
    width: 300%; 
  }

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

References

7488 questions
2
votes
1 answer

CSS animation from width 0 to 100

Here is what I want to do: I want to play an animation on a div which starts from width: 0 to width: 100vw, then back to 0 BUT when it goes back to width 0, and I want to animate from the left to right, like a "continous" animation, not a "reverse".…
Policsek
  • 191
  • 2
  • 2
  • 9
2
votes
1 answer

Animating SVG gradient border

I'm trying to make a loading animation with an irregular shape. The top shape is the vector object and the bottom is a single frame of the animation. I would like the gradient to animation in an infinite looping circle. Is this possible? Here is…
colindunn
  • 3,139
  • 10
  • 48
  • 72
2
votes
2 answers

Seamlessly blend animations on hover

I have a two animations, one is a default animation that rotates a div on the z axis, and when you hover over the div, I have it scale up and down as well. Is there a way for me to animate between the two animations? Currently if the animation is…
Get Off My Lawn
  • 34,175
  • 38
  • 176
  • 338
2
votes
2 answers

Icon to begin transition in the centre of screen

I am attempting to make the icon appear in the middle of the screen before it transitions off to the left. Here is my code at the moment: #courseIcon { position: relative; background: url(https://placehold.it/100x100); background-size:…
Eddie
  • 390
  • 3
  • 13
2
votes
1 answer

Blurry content at ::after (pseudo element) for mobile version (Animated CSS Button)

I created a call-to-action button that makes a small animation on click: Static and showing ADD TO CART On click: Background animation (duration 1sec) and content = 'Adding to cart' After 1sec: New background colour and showing ADDED TO CART Go to…
Rafael Perozin
  • 573
  • 7
  • 20
2
votes
3 answers

HTML Scrolling Text Wider than Container

I've been working on this for a while and haven't come up with a suitable solution yet. I have some banner text that absolutely has to scroll/marquee. The example I'm using is stock data but it's other, user-defined-on-the-fly, text that will…
2
votes
2 answers

Flip Multiple Images one after another after some Delay

In my website, I want to create a CSS animation where I am trying to flip multiple images one after another after 1sec delay, but it's not working. When the first images flips then second image should flip then thrid and so on Like this but onload,…
Keval
  • 557
  • 10
  • 15
2
votes
1 answer

How to animate linear-gradient from top left to bottom right?

I am working on creating a Facebook content placeholder with the shimmer effect. I just want to animate the background property (or applying the linear gradient from top left to bottom right,) from the top left and end to the bottom right. .Box…
Ajay Jayendran
  • 1,584
  • 4
  • 15
  • 37
2
votes
1 answer

Fading background color on striped table

I have a bootstrap striped table (.table-striped > tbody > tr:nth-of-type(odd){background-color: #f9f9f9;}), and I'm drawing the user's attention to the updated row using this little bit of CSS: .attention { animation: 3s attention; } @keyframes…
Stian
  • 1,522
  • 2
  • 22
  • 52
2
votes
2 answers

How do I loop through multiple background videos?

I'm trying to build a page with just three background videos playing one after the other when the page loads then reset back to the first and starts again kind of like a automatic loop but only the first video plays. similar to this site …
2
votes
1 answer

How to add background colors to pattern fills?

How do I convert this code so that the path with id #wires has the color #000 initially and then being colored by the pattern and keyframes as oppossed to no color at all? So essentially the star should be black and the gradient animation will creep…
Vivek Joshy
  • 974
  • 14
  • 37
2
votes
3 answers

First header element disappears if user scrolls down the page

I have developed the following simple HMTL and CSS code which you can also find in de JSFiddle here: body { margin: 0; } .header { width: 80%; height: 10%; margin-left: 10%; position: fixed; top: 0; box-sizing:…
Michi
  • 4,663
  • 6
  • 33
  • 83
2
votes
1 answer

How to keep the state of an animation until a session if ended with sessionStorage?

let me explain what i want to achieve. I would like to show an animation only once during the session of an user. The animation can start only if the person quit is browser and comeback the the website. If the person refresh or open the url in…
Max
  • 196
  • 1
  • 5
  • 14
2
votes
2 answers

Bounce animation on a scaled object

What is the best way to have an object scale and then perform a bounce animation at that scale factor before going back to the original scale factor. I realize I could do something like scaling it to 2.2, then 1.8, then 2.0, but I'm looking for a…
Harper Creek
  • 437
  • 6
  • 19
2
votes
1 answer

Trying to animate a show/hide definition list with hidden attribute (hidden attribute causes animation to not work)

I'm building an accessible accordion using a definition list. I have this working well, where the
contains a
magenta placenta
  • 1,461
  • 7
  • 22
  • 34
1 2 3
99
100