round(), mod() & rem() snap lab
The teal point moves freely. The orange node is placed by CSS alone with round(). Drag the point, tap the grid or use the arrow keys.
0,0
mod() vs rem() on x
mod(x, step)0px
rem(x, step)0px
The CSS doing it
Computed by the browser (x, y)
- raw
- 0, 0
- round()
- 0, 0