CSS Display an Image Resized and Cropped

前端 未结 19 1585
时光取名叫无心
时光取名叫无心 2020-11-22 08:09

I want to show an image from an URL with a certain width and height even if it has a different size ratio. So I want to resize (maintaining the ratio) and then cut the imag

19条回答
  •  渐次进展
    2020-11-22 08:49

    What I've done is to create a server side script that will resize and crop a picture on the server end so it'll send less data across the interweb.

    It's fairly trivial, but if anyone is interested, I can dig up and post the code (asp.net)

提交回复
热议问题