Sign-related functions
Type | Syntax | Description |
---|---|---|
abs() Function | width: abs(20% – 100px); | It calculates the absolute value of the number |
sign() Function | top: sign(20vh – 100px); | It calculates the sign of the number |
CSS Math Functions
In this article, we will learn about the CSS Math Functions. CSS Math Functions enable you to express CSS numeric values using mathematical expressions directly in your stylesheets. By using CSS Math Functions, we achieve greater flexibility and ease in creating responsive layouts and styling elements. We can use calc(), max(), and min() math functions to make our work easy.
CSS Math Functions are classified into the following types:
- Basic arithmetic
- Comparison functions
- Trigonometric functions
- Exponential functions
- Sign-related functions
- Stepped value functions
Contact Us