<div class="img_box"> <img src="http://sms-shop.oss-cnbeijing.aliyuncs.com/${item.bannerpic.split(‘,‘)[0]}"/> </div> .img_box { position: relative; width: 90%; padding-bottom: 100%; } .img_box img { position: absolute; top: 0; width: 100%; height: 100%; }
原文地址:https://www.cnblogs.com/wsjaizlp/p/12613190.html
时间: 2024-11-09 05:14:19