具体是怎么使用的,可以加一个基本版的demo吗?
最简单的使用方法引入my_popup.css、my_popup.js
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>例子</title> <link rel="stylesheet" href="./my_popup.css"> </head> <body> <button class="popup-show" data-linked-id="onePopup">按钮</button> <div class="my-popup one-popup" id="onePopup"> <div class="popup-content"> <p class="msg">我是一个弹窗,点击透明遮罩层我就会隐藏</p> </div> </div> <script src="./my_popup.js"></script> <script> window.onload = function () { var oMyPopup = new MyPopup('onePopup'); } </script> </body> </html>
样式真的是丑到爆啊!!!
样式可以在难看一点吗?