下面给大家分享html5点击弹出图片,分为前台代码和js代码,具体内容如下所示:
前台代码:
1 2 3 4 5 6 7 8 9 10 11 12 13 | < a href = "javascript:;" onclick = "repeat()" > < div id = "modal_volume" style = "position: fixed; text-align: center; width: 100%; height: 100%; top: 0; z-index: 9999; display: none;" > < table style = "width: 100%; height: 100%;" >< tbody >< tr > < td align = "center" style = "" > < div style = "width: 900px; position: relative" > < a href = "zjb_enroll?course=%E4%B8%93%E4%B8%9A%E8%AF%BE%E6%8F%90%E9%AB%98%E7%8F%AD" > < img decoding = "async" src = "Content/images/tanchuang.jpg" ></ a > < a href = "javascript:%24('#modal_volume').fadeOut();" style = "display: block; width: 45px; height: 45px; position: absolute; right: 11px; top: 10px; z-index: 2" ></ a > </ div > </ td > </ tr ></ tbody ></ table > </ div ></ a > |
js代码
1 2 3 4 5 | <script> function repeat() { $( '#modal_volume' ).fadeIn(); } </script> |
到此这篇关于html5实现点击弹出图片功能的文章就介绍到这了,更多相关html5点击弹出图片内容请搜索IT俱乐部以前的文章或继续浏览下面的相关文章,希望大家以后多多支持IT俱乐部!