html图片固定的容器内等比缩放
css
<style> .lgl-img-auto { height: 200px; width: 200px;} .lgl-img-auto img { height: auto; width: auto; max-height: 100%; max-width: 100%;} </style>
html
<div class="lgl-img-auto"> <img src="(https://img-blog.csdn.net/20180920101310407?watermark/2/text/aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM0NzIwNTMx/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70)"> </dvi>
img 图片等比缩放
最新推荐文章于 2024-01-17 10:57:29 发布