我有以下html:
<div id="ProductImages" align="center">
<div id="divProductPicZ72" class="c1"></div>
<div id="divProductPic72">
<a href="javascript:void(0);" onclick=
"popupimg('images/Product/large/72.jpg');"><img border="0" id="ProductPic72" name=
"ProductPic72" class="c2" onclick="popupimg('images/Product/large/72.jpg')" title=
"Click here to view larger image" src="images/product/medium/72_1_.png" alt=
"SK100DS" /></a>
</div>
<img border="0" class="c2" onclick="setcolorpicidx_72(1);" alt="Show Picture 1"
src="images/PRODUCT/icon/72_1_.png" /><img border="0" class="c2" onclick=
"setcolorpicidx_72(2);" alt="Show Picture 2" src=
"images/PRODUCT/icon/72_2_.png" />
<img border="0" class="c2" onclick="setcolorpicidx_72(3);" alt="Show Picture 3" src=
"images/PRODUCT/icon/72_3_.png" />
<img border="0" class="c2" onclick="setcolorpicidx_72(4);" alt="Show Picture 4" src=
"images/PRODUCT/icon/72_4_.png" />
<img border="0" class="c2" onclick="setcolorpicidx_72(5);" alt="Show Picture 5" src=
"images/PRODUCT/icon/72_5_.png" />
<img border="0" class="c2" onclick="setcolorpicidx_72(6);" alt="Show Picture 6" src=
"images/PRODUCT/icon/72_6_.png" />
<img border="0" class="c2" onclick="setcolorpicidx_72(7);" alt="Show Picture 7" src=
"images/PRODUCT/icon/72_7_.png" />
</div>
</div>
标签后面的 div<div id="divProductPic72">
是主图片,当您单击它时,我有代码在新窗口中将其弹出更大。
我想注入一些 jquery 来使所有图像更小,因为它们是缩略图。他们在上面的div之后。
我喜欢制作 100x100 的缩略图。
我试过这个:
$("div#ProductImages img").css("width", "100px");
不确定这是否正确?