css divide width 100% to 3 column

前端 未结 11 644
余生分开走
余生分开走 2020-12-12 21:38

I have a layout where I have 3 columns.

Therefore, I divide 100% by 3.

The result is obviously 33.333....

My goal is perfect

11条回答
  •  余生分开走
    2020-12-12 22:13

    Using this fiddle, you can play around with the width of each div. I've tried in both Chrome and IE and I notice a difference in width between 33% and 33.3%. I also notice a very small difference between 33.3% and 33.33%. I don't notice any difference further than this.

    The difference between 33.33% and the theoretical 33.333...% is a mere 0.00333...%.

    For arguments sake, say my screen width is 1960px; a fairly high but common resolution. The difference between these two widths is still only 0.065333...px.

    So, further than two decimal places, the difference in precision is negligible.

提交回复
热议问题