safari rounding down on subpixel calculations

后端 未结 6 1593
小鲜肉
小鲜肉 2020-12-31 08:47

i have a container that takes up 829px on a row, and has a background-image of the same size.

i have a div within that container that calculates its width based on t

6条回答
  •  时光说笑
    2020-12-31 09:31

    These days you could use flexbox (pure CSS) to handle this.

    From the source linked above:

    The main idea behind the flex layout is to give the container the ability to alter its items' width/height (and order) to best fill the available space (mostly to accommodate to all kind of display devices and screen sizes). A flex container expands items to fill available free space, or shrinks them to prevent overflow.

提交回复
热议问题