简体   繁体   English

网站上显示预览所需的建议

[英]Suggestion needed for display previews on website

I'm working on a project, my page have lots of images(like 100, they are all dynamic contents), I want each them to show a preview block with image, date and time, text, title inside of the block when mouse hover. 我正在做一个项目,我的页面上有很多图像(例如100个,它们都是动态内容),我希望每个图像在鼠标单击时在块内显示一个预览块,其中包含图像,日期和时间,文本,标题徘徊。

Wonder which way is the best way to do this. 想知道哪种方法是最好的方法。

  1. create a hidden div block with everything in it, use jquery to show and hide it. 创建一个包含所有内容的隐藏div块,使用jquery进行显示和隐藏。
  2. use jquery to append it and then remove it. 使用jquery附加它,然后将其删除。
  3. your method. 您的方法。

Thanks for your help 谢谢你的帮助

我认为最有效的方法是先加载预览事物,然后在需要时使用AJAX获得特定内容。

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

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