用CSS给图片设置大小

来源:互联网 发布:chm2doc软件下载 编辑:程序博客网 时间:2024/06/05 22:42

“梦里玉人方下马,恨它天外一声鸿”

很多时候我们在给标签设置宽和高时,都不尽人意.这时候我们可以用max-height和max-width或者min-height和min-width来这是宽高

<img class="photo1"  style="width:350px;height: auto;max-height: 500px;max-width: 350px; min-width:350px ;overflow:hidden; " id="conPhotoPath1" src=""onerror="notFindPicture()">
原创粉丝点击