It has always been a headache for me, that is, the problem of image scaling.CodeWriting to JS is not easy to modify. Writing to CSS does not support max-width in IE 6. It took a long time today to finally solve this problem. It is basically perfect. The only thing that is imperfect is that IE 6 will automatically resize the image only after it is completely downloaded, but it is better than nothing, it is more comfortable than seeing a long horizontal scroll bar after entering the page. expression is used here, but it is loaded once, so expression will not cause memory leakage. Of course, if you have a better solution, I hope you can communicate with me. Contact: 1982xie@163.com
The Code is as follows:
. Image {
Max-Width:600px;Height:Auto;Cursor:Pointer;
Border:1px Dashed #4e6973;Padding:3px;
Zoom: expression (function (ELM ){
If (ELM. width>560){
VaR oldvw = Elm. width; Elm. width =560;
Elm. Height = Elm. Height *(560/Oldvw );
}
Elm. style. Zoom ='1';
} (This));
}