function
rem() — CSS reference
Calculate the remainder using truncation toward zero; its sign follows the dividend (unless zero). Do not confuse the function with the rem length unit. A zero divisor yields NaN.
Formal Syntax & Structure
css syntaxcss
rem(<calc-sum>, <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 {margin-left: rem(-17px, 10px)} #b {margin-left: rem(17px, -10px)}</style><body><div class="parent"><div id="a" class="sample"></div><div id="b" class="sample"></div></div></body></html>