Today, I encountered a problem about how to use js to solve the problem that ie6 does not support max-width and max-height. At first, I used the jQuery method to implement it, but I never got the value in css, for example, if ($. browser. msie & amp; $. browser. version6.0) {varmaxWidth...
Today, I encountered a problem about how to use js to solve the problem that ie6 does not support max-width and max-height. At first, I used the jQuery method to implement it, but I still couldn't get the values in css, as shown in
If ($. browser. msie & $. browser. version = 6.0)
{
Var maxWidth = parseInt ($ ('. viewBigPic img').css ('max-width '));
$ ('. ViewBigPic img'). each (function (){
If ($ (this). width ()> maxWidth)
$ (This). width (maxWidth );
});
}
I don't know why. I can't get the maximum value in css, and then I can only implement it using native js. The js Code is as follows: