code icon

CSCI 1720

Intermediate Web


× INDEX
ANIMATION BACKGROUND BORDER BOX COLUMN COLORS FONT LIST POSITIONING PSEUDO TRANSITIONS TEXT

Animations

Property

Values

animations
animation-name
animation-duration
animation-timing-function
animation-delay
animation-iteration-count
animation-direction
animation-delay
time
animation-direction
normal | alternate
animation-iteration-count
inherit | number
animation-play-state
running | paused
rotation
angle rotation-point position (paired value off-set)
animation-timing-function
ease | linear | ease-in | easeout | ease-in-out | cubic-Bezier (number, number, number, number)






Learn More
CSS (3) includes functions that allow for animation of elements

When you specify CSS styles inside the @keyframes rule, the animation will gradually change from the current style to the new style at certain times

To get an animation to work, you must bind the animation to an element

/* The animation code */
@keyframes example {
    from {background-color: red;}
    to {background-color: yellow;}
}

/* The element to apply
the animation to */
div {
    width: 100px;
    height: 100px;
    background-color: red;
    animation-name: example;
    animation-duration: 4s;
}