function

acos() — CSS reference

Inverse cosine accepts a number from -1 to 1 and returns an angle from 0deg to 180deg. Out-of-domain inputs produce NaN.

Formal Syntax & Structure

css syntaxcss
acos(<calc-sum>)

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS math lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#a {transform:rotate(acos(0.5))} #b {transform:rotate(acos(-0.5))} .sample {width:60px;height:20px;margin:30px}</style><body><div class="parent"><div id="a" class="sample"></div><div id="b" class="sample"></div></div></body></html>
CSS Reference