简体   繁体   English

如何停止缩放脚本扩展表格的外侧

[英]How do I stop a zoom script from expanding the outer sides of a table

I just built a website and borrowed a piece of free javascript to zoom in on product images. 我刚刚建立了一个网站,并借用了一段免费的JavaScript来放大产品图片。

The only problem is that the image blows out the sides of my tables and it looks clunky. 唯一的问题是,图像吹到桌子的两边,显得笨拙。

Can someone please have a look at this page for example: 有人可以看看这个页面吗,例如:

http://workplacesafetywarehouse.com/ppe-equipment-list-products/l9265lyymc-12-led-viper-warning-light.htm http://workplacesafetywarehousehouse.com/ppe-equipment-list-products/l9265lyymc-12-led-viper-warning-light.htm

Hover over the image and tell me how I can make it zoom in without pushing my table apart? 将鼠标悬停在图片上,告诉我如何在不将桌子分开的情况下进行放大? Note that I don't mind if it pushes the internal 's apart and wraps the text, just the outer perimeter. 请注意,我不介意是否将内部的分隔开并包裹文本,仅包裹外部的外围。

I also wouldn't be against replacing it with a better zoom in javascript if that's a better way to go. 如果这是更好的方法,我也不会反对用更好的javascript缩放来替代它。

Many thanks guys. 非常感谢。

Cathy 凯茜

You should change in this code onmouseover="resizeImg(this, 300)" to onmouseover="resizeImg(this, 200)" . 您应该在此代码onmouseover="resizeImg(this, 300)"更改为onmouseover="resizeImg(this, 200)" in future you change this value to controle your zoom size. 以后您可以更改此值以控制缩放大小。 300 means 3x zoom of your original size image so you mange your zoom size from this. 300表示原始尺寸图像的3倍缩放,因此您可以从中管理缩放尺寸。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM