CSS exp() Function
Example
Use exp() to rotate elements:
div.a {
transform: rotate(calc(1turn * exp(1)));
}
div.b {
transform: rotate(calc(1turn * exp(0)));
}
div.c {
transform: rotate(calc(1turn * exp(-1)));
}
div.d {
transform: rotate(calc(1turn * exp(-0.90)));
}
Try it Yourself »
Definition and Usage
The CSS exp()
function returns E raised to
the power of the specified number x (Ex).
The constant E (2.718281828459045), is the base of natural logarithms.
Some examples:
- exp(0) represents 1
- exp(1) represents E (2.718281828459045)
- exp(-infinity) represents 0
- exp(infinity) represents infinity
Version: | CSS4 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
exp() | 120 | 120 | 118 | 15.4 | 106 |
CSS Syntax
exp(number)
Value | Description |
---|---|
number | Required. The number to be raised by the power of E |
Related Pages
CSS reference: CSS acos() function.
CSS reference: CSS asin() function.
CSS reference: CSS atan() function.
CSS reference: CSS atan2() function.
CSS reference: CSS calc() function.
CSS reference: CSS cos() function.
CSS reference: CSS hypot() function.
CSS reference: CSS log() function.
CSS reference: CSS mod() function.
CSS reference: CSS pow() function.