Image resize script

独自空忆成欢 提交于 2019-12-11 16:15:54

问题


I'm searching a javascript that can resize images similar to script thats available as a plugin in vBulletin CMS:

I want the script to be used in blogger blog so that all images i upload into a post are resized to a smaller res and on clicking the image should be displayed in original dimensions

Something of the sort getelementbyID("img").

are there any script providing this feature? Pls help me out

Thanks in advance.


回答1:


Something like a lightbox, perhaps?

I know the specific interaction you're asking about, and personally, I've always found it really obnoxious.




回答2:


If you don't want to use a server side script to automatically create a smaller version of the image that you would link to the larger version, I wouldn't recommend using JavaScript to resize an image either. I'd recommend setting the image's dimensions in CSS and then attaching a click handler with JS that showed the image in some sort of overlay (or just using HTML to link to the larger image file).



来源:https://stackoverflow.com/questions/6314005/image-resize-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!