首页 > 如何让图片遇到父容器边缘自动换行显示,不会溢出

如何让图片遇到父容器边缘自动换行显示,不会溢出

        <div class="item">
           <img ng-src="{{file.path}}" ng-repeat="file in fileList" ng-click="goToViewFile()" class="avatar" style="width: 100px;height: 100px;padding: 5px">
        </div>
        

最后的显示结果如下:

一共6张图片明显有2张溢出无法显示
请问如何设置样式,让溢出的图像能够换行显示


请贴出你的css样式代码:

你可以尝试着,在<img>标签中使用 style="float:left"

【热门文章】
【热门文章】