Why is the second square of the left and top lines of svg strongly do not coincide with the boundaries of the div? However, the right and bottom are also not very similar, but they are much more accurate.
https://jsfiddle.net/94toma4j/1/
* { box-sizing: border-box; } body { width: 11em; transform: scale(3); transform-origin: 2em 2em; } div { position: absolute; left: 2em; top: 2em; height: 4em; width: 4em; border: 1px solid; } svg { position: absolute; top: 0; left: 0; width: 10em; height: 10em; pointer-events: none; } path { fill: none; stroke: rgba(255,0,0,.5); stroke-width: .1; } <div> <div></div> </div> <svg viewBox="0 0 10 10"> <path d="M2,2h4v4h-4zm2,2h4v4h-4z" /> </svg> Screenshot:

box-sizingwrote, but I didn’t think about the shift with respect to viscera. Thank! Answer write? - Qwertiy ♦