很多网页都实现了弹出窗口,使用方面,特别的人性化,本文就大家介绍javascript实现弹出窗口特效,具体代码如下:
弹出窗口 *{ margin: 0; padding: 0; } div{ margin: 0 auto; } .overBg{ width: 100%; height: 100%; background: gray; opacity: 0.5; filter: alpha(opacity=50); position: fixed; top:0; z-index: 300; } .tc-con{ width: 200px; height: 200px; padding: 30px; background: blanchedalmond; position: fixed; top: 0; z-index: 1000; } 点击出现 22 22 弹出窗口 *{ margin: 0; padding: 0; } div{ margin: 0 auto; } .overBg{ width: 100%; height: 100%; background: gray; opacity: 0.5; filter: alpha(opacity=50); position: fixed; top:0; z-index: 300; } .tc-con{ width: 200px; height: 200px; padding: 30px; background: blanchedalmond; position: fixed; top: 0; z-index: 1000; } 点击出现 22 22
效果图:
以上就是为大家分享的javascript弹出窗口实现代码,希望对大家的学习有所帮助。



