Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var str = '\
- <style>\
- #cq-popup {\
- width: 700px;\
- height: 350px;\
- z-index: 23;\
- left: calc(50%);\
- top: calc(50%);\
- position: fixed!important;\
- padding: 60px 40px 60px 40px;\
- background-repeat: no-repeat; \
- background-position: right;\
- background-color: #fff;\
- font-family: Open Sans, sans-serif;\
- transform: translate(-50%, -50%) scale(1);\
- }\
- #cq-popup h3 {\
- font-size: 40px;\
- padding: 0;\
- width: 500px;\
- float: left;\
- text-align: left;\
- margin-bottom: 10px;\
- }\
- #cq-popup > div {\
- width: 500px;\
- font-size: 27px;\
- line-height: 36px;\
- }\
- #cq-popup-btclose {\
- text-decoration: none;\
- font-size: 29px;\
- position: absolute;\
- right: 10px;\
- top: 0px;\
- }\
- #cq-popup-bg {\
- cursor: pointer;\
- position: fixed;\
- top:0; \
- width: 100%; \
- height: 100%;\
- background: rgba(51,51,51,0.8);\
- z-index: 22;\
- }\
- </style>\
- <div id="cq-popup-bg"></div>\
- <div id="cq-popup">\
- <a id="cq-popup-btclose" href="#">×</a>\
- <h3>\
- Првиет\
- </h3>\
- <div>Привет Мир!</div>\
- </div>\
- </div>\
- ';
- var div = document.createElement('div');
- div.innerHTML = str;
- document.body.appendChild(div)
- document.getElementById('cq-popup-btclose').onclick = function () {
- document.getElementById('cq-popup-bg').remove();
- document.getElementById('cq-popup').remove();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement