Repeating website background image - size vs speed

前端 未结 7 1488
滥情空心
滥情空心 2020-12-09 08:57

I was wondering if anyone has done any tests with background images. We normally create a background that repeats at least in one direction (x or y or both).

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 09:32

    If small dimensions of an image have a negative impact on rendering, I'm sure any decent browser would blit the image internally a few times before tiling.

    That said, I tend not to use 1 pixel image dimensions, so I can see the image clearly without resizing it. PNG compression is good enough to handle this at very little cost to file size, in most situations.

提交回复
热议问题