The reason border-width:0.5px doesn't work is because browsers do layout relative to (device-independent) pixels. Although physical pixels can be much smaller, so they can display elements smaller than a pixel, this does not affect the layout.
Since the css border property affects the layout, browsers will only use the width of an integer pixel. box-shadow only affects rendering, not layout, and therefore supports fractional units.
David narum
source share