img{ width: auto; height: auto; max-width: 100%; max-height: 100%;}
最近做公益项目用到了这个。
根据父容器的自动缩放,并保持图片原来的比例。这样你设置父容器的大小就可以啦。
时间:2020-07-27 20:12:09
img{ width: auto; height: auto; max-width: 100%; max-height: 100%;}
最近做公益项目用到了这个。
根据父容器的自动缩放,并保持图片原来的比例。这样你设置父容器的大小就可以啦。
html图片缩放6 html img图片不变形等比例缩放 兼容ie6
2020-12-22
html img图片等比例缩放_Opencv-python之图像的缩放
2021-08-06