是否可以在Fancybox的弹出窗口中显示指向原始图像的链接?
I did this here: http://photocontest.highpoint.edu/
I had to hack/customize Fancybox to achieve this.
The biggest problem I had was that Fancybox creates clickable areas to go to the next/previous images. These clickable areas take 100% of vertical space. That means you couldn't click on links below FancyBox. It took a bit of jQuery to manipulate CSS to work around that.
This is my javascript function to fix Fancybox CSS:
function fix_fancybox_css() { if ($("div#fancybox-content a").length>0) { $("#fancybox-left, #fancybox-right").css({ 'height':Math.floor($("div#fancybox-content a:visible").position().top)+'px', 'top':'0px', 'bottom':'' }); } }
I assume you are trying to display the URL along with the image in a popup window. I haven't used Fancybox myself but there is a similar jQuery lightbox clone called prettyPhoto which is very simple to use. You can add your own content (URL in your case) as a description for the image which appears just below the image in the popup. You can check out a demo on its website.
Sure. Check out the inline examples on fancybox.net. They're just HTML.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.