CSS Functions
A comprehensive list of CSS functions.
CSS Functions Reference
CSS functions are used as values for various CSS properties.
| Function | Description |
|---|---|
| attr() | Returns the value of an attribute of the selected element |
| calc() | Allows you to perform calculations to determine CSS property values |
| linear-gradient() | Creates a linear gradient as the background image |
| rgb() | Defines colors using the Red-Green-Blue model |
| rgba() | Defines colors using the Red-Green-Blue-Alpha model |
| url() | Links to an image, font, or other resource |
| var() | Inserts the value of a custom property (CSS variable) |
Example
/* Example of calc() */
div {
width: calc(100% - 100px);
}