Showing retina display image with pure css

后端 未结 2 2054
滥情空心
滥情空心 2021-01-13 07:43

I have a situation where I can\'t possibly know the dimensions of an image (a proprietary limited cms...)

I need to figure out how to show a retina level image, and

2条回答
  •  失恋的感觉
    2021-01-13 08:10

    Having thought about this issue myself - how about just using the x2 image and making sure to set the image's pixel dimensions? Retina displays will show it 1:1, and non-retina displays will show it at 50%. All clients have to load the x2 version though, meaning more traffic.

提交回复
热议问题