function
sin() — CSS reference
Return a unitless sine of an angle or number; a bare number is interpreted in radians. The result lies between -1 and 1. Scale the result by a length for a position or size.
Formal Syntax & Structure
css syntaxcss
sin(<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}.parent {width:300px} .sample {width:40px;margin-bottom:4px} #a {width: calc(100px * sin(30deg))} #b {width: calc(100px * sin(pi / 2))}</style><body><div class="parent"><div id="a" class="sample"></div><div id="b" class="sample"></div></div></body></html>