我应该在 html
或 javascript
或其他代码中编写一些代码,以通过单击图像打开弹出窗口.我已经看过 window.open()
方法,但这不是我想要的.确切地说,我想像 Twitter 那样打开一个图像弹出窗口:遮盖背景并在屏幕中间显示放大的图像.
I should write some code in html
or javascript
or other to open a popup window by clicking on an image.
I have already seen the window.open()
method, but this isn't what I am looking for.
Precisely I want to open an image popup like Twitter does: overshadowing the background and displaying the image enlarged in the middle of the screen.
有什么建议吗?
你可以用灯箱来做.
这个链接有一个简单的例子:
There is a simple example in this link:
http://lokeshdhakar.com/projects/lightbox2/
这篇关于HTML - JS 如何通过单击在图像弹出窗口中打开图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!