jquery solves the problem of IE6 in the image, resulting in a dislocation solution
Under Jqurey control in the product presentation page:
/* This label calls the product picture * *
<asp Tutorial: Image runat= "server" id= "productbigimg"/>
First introduce jquery
<script src= "/utility/js/jquery.js" type= "text/Web Effects" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#<%=productbigimg.clientid%>"). each (function () {
var maxwidth = 680; The maximum width of the picture, this number depends on the specific width of the product picture display. (In fact, to encapsulate this method,
Width as a parameter passing would be better, lazy, did not do:)
var ratio = 0; Scaling ratio
var width = $ (this). width (); Picture actual width
var height = $ (this). Height (); Picture actual height
Check if the picture is very wide
if (Width > maxwidth) {
Ratio = Maxwidth/width; Calculate zoom ratio
$ (this). CSS Tutorial ("width", maxwidth); Set the actual display width
Height = height * ratio; Calculate the height after equal scale scaling
$ (this). CSS ("height", height); Set the height of equal scale after scaling
}
});
});
</script>
Through this processing, the picture will be equal to the proportion of shrinking, in the IE6 will not be misplaced