css图片在div中等比缩放

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

 <style type="text/css">
    .suofang {MARGIN: auto;WIDTH: 200px;}
    .suofang img{MAX-WIDTH: 100%!important;HEIGHT: auto!important;width:expression(this.width > 200 ? "200px" :     this.width)!important;}

</style>

<body>
    <div class="suofang">
        <img src="http://www.baidu.com/img/bdlogo.gif"/>
    </div>
</body>