js实现非常棒的弹出div
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <html> <head> <meta charset="utf-8" /> <title>LIGHTBOX EXAMPLE</title> <style> .white_content { display: none; position: absolute; top: 25%; left: 25%; width: 50%; height: 50%; padding: 16px; border: 16px solid orange; background-color: white; z-index:1002; overflow: auto; } </style> <script> function one(){ document.getElementById('light').style.display='block'; } function two(){ document.getElementById('light').style.display='none'; } </script> </head> <body> <p>可以根据自己要求修改css样式 <a href="javascript:void(0)" onclick="one()">点击这里打开窗口</a> </p> <div id="light" class="white_content"> This is the lightbox content. <a href="javascript:void(0)" onclick="two()">Close</a> </div> </body> </html> |
来源:邦林织梦(微信/QQ号:909912499),欢迎分享本文,转载请保留出处!部分内容来自网络,如有侵权请联系删除处理!
相关信息
本站提供代码修改,dedecms,WordPress仿站二次开发 / PHP网站建设以及SEO优化等网络营销推广等服务。
如有需要请加QQ: 909912499