Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

点击图片放大高亮实现 #418

Closed
GuoZhaoHui628 opened this issue Aug 2, 2018 · 8 comments

Comments

@GuoZhaoHui628
Copy link

commented Aug 2, 2018

如题,想请教下怎样实现点击图片放大

@dongm2ez

This comment has been minimized.

Copy link
Member

commented Aug 2, 2018

好迷的问题,能详情描述吗

@GuoZhaoHui628

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

@dongm2ez 就是普通常见的功能,一篇博客中,如果有图片显示,点击图片,会显示清晰的大图。
好神奇,我翻了下作者的博客,所有文章中都没用到图片....

@dongm2ez

This comment has been minimized.

Copy link
Member

commented Aug 2, 2018

这是一个JS插件,或者一段JS代码实现的功能。

一般原理是页面上是缩略图或者限制大小的图片,鼠标点击或者放置后触发事件请求更清晰的图片或者更大尺寸的图片。

著名的插件有 zoomify.js、jquery zoom等,当然如果网站没有使用这个插件你也可以安装chrome浏览器插件给所有网站的图片都实现这个功能,比如 Imagus

@zoujiayu

This comment has been minimized.

Copy link
Collaborator

commented Aug 2, 2018

js可以实现,这个功能需要主题引入该js
这种效果?
default

有兴趣可以看看,有你想要的功能

@GuoZhaoHui628

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

@zoujiayu 不是这种,这种是重新开一个页面了,体验不是很好。我在使用
zoom.js
怎么实现不了呢

@GuoZhaoHui628

This comment has been minimized.

Copy link
Author

commented Aug 2, 2018

@dongm2ez 老哥,你用了 zoom.js 插件没。我在引入过程中一直报错。
mark
mark
mark

@zoujiayu

This comment has been minimized.

Copy link
Collaborator

commented Aug 3, 2018

@GuoZhaoHui628
自己写段js给img标签添加target="_blank"
应该可以

@GuoZhaoHui628

This comment has been minimized.

Copy link
Author

commented Aug 3, 2018

@dongm2ez @zoujiayu 谢谢!已经解决。效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.