CSS acos() Function
Example
Use acos() to rotate elements:
div.a {
transform: rotate(acos(0.5));
}
div.b {
transform: rotate(acos(1));
}
div.c {
transform: rotate(acos(-0.5));
}
div.d {
transform: rotate(acos(-1));
}
Try it Yourself »
Definition and Usage
The CSS acos()
function returns the inverse
cosine of a number.
The inverse cosine of a number returns an angle between 0 and 180 degrees.
The specified number must be between -1 to 1, otherwise this function returns NaN.
Version: | CSS4 |
---|
Browser Support
The numbers in the table specify the first browser version that fully supports the function.
Function | |||||
---|---|---|---|---|---|
acos() | 111 | 111 | 108 | 15.4 | 97 |
CSS Syntax
acos(number)
Value | Description |
---|---|
number | Required. A number between -1 and 1 |
Related Pages
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.