CSS - Percentages or Pixels?

前端 未结 9 780
梦如初夏
梦如初夏 2020-12-04 21:54

I have been using CSS for many years now, and I have always been a \'percentage\' kind of guy, as in I always define heights and widths using percentages as opposed to pixel

9条回答
  •  广开言路
    2020-12-04 22:24

    I like percentages too but it in certain cases it doesn't do what I expect. If for example i have two buttons sharing the same row with max-width: 50%, and the current viewport is not an even number, one of them will always be noticeably slightly larger.

提交回复
热议问题