CSS实现图片在div块的缩放 6056

CSS实现图片在div块的缩放代码如下:

.img 
{ 
max-width:458px; 
height:auto; 
cursor:pointer; 
border:1px double #4E6973; 
padding: 4px; 
zoom:expression( function(elm) 
       {     if (elm.width>458) 
               {  var oldVW = elm.width; elm.width=458;             
                   elm.height = elm.height*(458 /oldVW);        
                }         elm.style.zoom = '1';     
      } 
(this)); 
}