When CSS property values are set to change over a specified period of time, the element is animated on the page. Therefore, CSS animatable properties are properties that can gradually change from one value to another, such as size, number, color, or percentage.
CSS animations are just like transitions, only with better control and a wider variety of options.
We've compiled an A-Z list of CSS animatable properties along with a demo for each. Let's look at the various animations you can create with CSS on your site.
CSS Animatable Properties List
Here's a list of all the properties you can animate with CSS, what they do, and an example of each.
Note: Open the animation demos in in the incognito window of your browser.
This is shorthand for the property used for setting the page background. It lets you display up to eight properties: background-image, background-position, background-size, background-repeat, background-origin, background-clip, background-attachment, and background-color.
Some of these properties are animatable, which we've shared separately in more detail in this list of CSS animatable properties.
This property helps you set the background color of an element, meaning the space occupied by an element, including the padding and border but excluding the margin.
Color values can be specified in different ways:
- Hexadecimal in the format of #rrggbb
- RGB in the format of rgb (red, green, blue)
- RGBA in the format of rgba (red, green, blue, alpha)
- HSL in the format of hsl (hue, saturation, lightness)
- HSLA in the format of hsla (hue, saturation, lightness, alpha)
- Predefined. The CSS and HTML specification includes 140 predefined color names you can use.
- The currentcolor keyword can be used to represent the value of a color property. When used, elements that don't have a property value can inherit the color by default.
This is used to set the starting position of a background image. Values include left top, left center, left bottom, right top, right center, right bottom, center top, center center, and center bottom.
This is used to set the size of the background image. Values include auto, length, percentage, cover, and contain.
This helps you style the borders of an element. It's a shorthand property for: border-width, border-style, and border-color. When the border isn't specified, the text color is applied.
This is used to style the bottom border. It's a shorthand property for: border-bottom-width, border-bottom-style, and border-bottom-color.
This sets the color of the bottom border of an element. Note that you need to have a border before you can apply color to it. Thus, always define the border-style or border-bottom-style before border-bottom-color.
This adds rounded borders to the corners of the element. It lets you define the radius of the bottom left corner. Values include length and percentage.
This defines the radius of the bottom right corner.
This sets the width for the bottom border. It should be defined after the border is created, after border-style or border-bottom-style properties. Values include medium, thin, thick, and length.
This sets the border color. It can be defined by up to four values in the format of border-color: color1 color2 color3 color4;
If it has four values, each side of the border gets the specified color.
If it has three values, the top and bottom borders get the first and last specified color, while the right and left borders are styled with the middle color.
If it has two values, the top and bottom colors take the first, while the right and left borders take the second color.
If it has only one value, all borders have the specified color.
This styles the left border. It's a shorthand property for: border-left-width, border-left-style, and border-left-color.
This sets the color of the left border. Values include color and transparency.
This sets the width for the left border. Values include medium, thin, thick, and length.
This styles the right border. It's a shorthand property for: border-right-width, border-right-style, and border-right-color.
This sets the border for the right color.
This sets the width for the right border.
This defines the distance between borders of cells in a table.
This styles the top border. It's a shorthand property for: border-top-width, border-top-style, and border-top-color.
This sets the color of the top border.
This defines the top left corner radius.
This defines the top right corner radius.
This sets the width of the top border.
This is used to position an element vertically. It only affects positioned elements.
When the position is:
- position: absolute; or position: fixed; the bottom edge of the element is set to a unit above or below the bottom edge of the nearest positioned ancestor.
- position: relative; the bottom edge moves above or below its normal position.
- position: sticky; the bottom property behaves like it's in a relative or fixed position when the element is inside and outside a viewport, respectively.
- position:static; the property has no effect.
This adds shadows to an element. Values include none, horizontal offset, vertical offset, blur, spread, and color.
This lets you clip an image that's larger than its containing element. Values include auto and shape.
This defines the color of the text.
This divides an element into columns. Values include number and auto.
This sets the gap between columns. Values include length and normal.
This defines the width, style, and color of the rule between columns. It's a shorthand property for: column-rule-width, column-rule-style, and column-rule-color.
This sets the color of the rule between columns.
This sets the width of the rule between columns. Values include medium, thin, thick, and length.
This sets the column width. Values include auto and length.
This sets the column width and count. It's a shorthand property for: column-width and column-count.
This sets visual effects to an element, such as blur and saturation. Values include blur, brightness, contrast, and grayscale.
This sets the flexible length on flexible items. It's a shorthand property for: flex-grow, flex-shrink, and flex-basis.
This defines the initial length of a flexible item. Values include: number and auto.
This specifies how much an item will grow in comparison to other flexible items in the container.
This specifies how much an item will shrink compared to the other flexible items in the container.
This styles the text font. It's a shorthand property for: font-style, font-variant, font-weight, font-size/line-height, and font-family.
This sets the size of the font. Values include medium, xx-small, x-small, small, large, x-large, xx-large, smaller, larger, length, and percentage.
This lets you control the size of the font displayed by the browser in case the first selected font isn't available.
This lets you make the text narrower or wider. Values include normal, expanded, and condensed.
This sets the thinness or thickness of the font. Values include normal, bold, bolder, lighter, and number.
This styles the grid layout. It's a shorthand property for: grid-template-rows, grid-template-columns, grid-template-areas, grid-auto-rows, grid-auto-columns, and grid-auto-flow.
This defines the size and location of an item in a grid layout. It's a shorthand property for: grid-row-start, grid-column-start, grid-row-end, and grid-column-end.
This sets the size for columns in a grid container. It affects columns that don't have a specified size. Values include length, percentage, auto, and fit-content.
This determines how auto-placed items are added into the grid. Values include row, column, dense, row-dense, and column-dense.
This sets the size of rows. Values include auto, max-content, min-content, and length.
This defines the size and location of a grid item. It's a shorthand property for: grid-column-start and grid-column-end.
This defines the number of columns a grid item will span. Values include auto, span, and column-line.
This sets the size of the gap between columns.
This specifies the column-line on which the grid item will start.
This specifies the size of the gap between rows and columns. It's a shorthand property for: grid-row-gap and grid-column-gap.
This sets the size and location of a grid item. It's a shorthand property for: grid-row-start and grid-row-end.
This defines the number of rows a grid item will span.
This sets the gap between rows.
This determines which row-line the grid item will start.
This sets up the grid template. It's a shorthand property for: grid-template-rows, grid-template-columns, and grid-template-areas.
This specifies the areas inside the grid layout.
This defines the number and size of columns in a layout.
This defines the number and size of rows in a layout.
This defines the height of an element. This height doesn't include margins, borders, and padding. Values include auto, length, and percentage.
This sets the left edge of positioned elements. It affects the horizontal position of an element.
This sets the distance between characters in text.
This sets the height of a line.
This sets the margins for an element. It's a shorthand property for: margin-top, margin-right, margin-bottom, and margin-left. The margin can be specified by four, three, two, or one value.
This sets the bottom margin of an element.
This sets the left margin of an element.
This sets the right margin of an element.
This sets the top margin of an element.
This defines the maximum height of an element.
This defines the maximum width of an element.
This defines the minimum height of an element.
This defines the minimum width of an element.
This works in conjunction with object-fit to define the position of an <img> or <video> inside its own content box using x/y coordinates.
This sets the degree of opacity for an element.
This defines the order of a flexible item relative to other flexible items in the container.
This sets the outline around an element. It's a shorthand property for: outline-width, outline-style, and outline-color.
This defines the color of an outline.
This adds a space between an outline and the border of an element.
This sets the width of an outline.
This adds padding to an element. This is the space between the content and the border. It's a shorthand property for: padding-top, padding-right, padding-bottom, and padding-left. It can have one to four values.
This defines the bottom padding of an element.
This defines the left padding of an element.
This defines the right padding of an element.
This defines the top padding of an element.
This dives perspective to 3D-positioned elements.
This defines the position of the viewer relative to the 3D object.
This defines the right edge of a positioned element. It affects the horizontal position and has no effect on non-positioned elements.
This specifies the color for overlines, underlines, and linethroughs.
This sets the indentation of the first line in a block of text.
This adds shadow to text. Values include horizontal shadow, vertical shadow, blur radius, and color.
This defines the top edge of a positioned element. It affects the vertical position and has no effect on non-positioned elements.
This applies 2D or 3D effects to an element. You can move, rotate, scale, or skew an element alongside other capabilities.
This lets you change the position of a transformed element.
This defines the vertical alignment on an element.
This determines the visibility of an element.
This sets the width of an element. This doesn't include margins, borders, or padding.
This defines the white space between words.
This sets an element's stack order. Greater stack order elements appear before lower stack order elements.
CSS Animatable Properties (A - Z)
There you have it! A list of all the animatable properties within CSS. These will help make your website and presentations more lively and interactive.