Home >Web Front-end >HTML Tutorial >The difference between border and outline
The difference between border and outline:
Border supports box-sizing: border-box. When there is a border, the border is added and processed according to the previous margin
outline does not support box-sizing: border-box; handle the margin first, then add the outline, which is somewhat similar to scaling (transform: scale(1.2);) regardless of the size of the outline, the style does not affect the layout.