In CSS, you can set an element’s border to 0.5 pixels. How does that even work?

142 views

In CSS, you can set an element’s border to 0.5 pixels. How does that even work?

In: 2

6 Answers

Anonymous 0 Comments

Interpolation. If the border is #000 and the pixel where half of the border is supposed to be is #fff, the pixel color will be in between both.

Also there’s a lot of devices that have more dense displays (phones, tablets, higher end laptops…) and don’t map pixels 1:1.

You are viewing 1 out of 6 answers, click here to view all answers.