function

atan() — CSS reference

Inverse tangent accepts a number and returns an angle in the principal interval from -90deg to 90deg. It cannot distinguish opposite quadrants from a ratio alone; use atan2() for that.

Formal Syntax & Structure

css syntaxcss
atan(<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(atan(1))} #b {transform:rotate(atan(-1))} .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