Advertisement
Guest User

Untitled

a guest
May 13th, 2016
710
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var str = '\
  2.         <style>\
  3.             #cq-popup {\
  4.                 width: 700px;\
  5.                 height: 350px;\
  6.                 z-index: 23;\
  7.                 left: calc(50%);\
  8.                 top: calc(50%);\
  9.                 position: fixed!important;\
  10.                 padding: 60px 40px 60px 40px;\
  11.                 background-repeat: no-repeat;  \
  12.                 background-position: right;\
  13.                 background-color: #fff;\
  14.                 font-family: Open Sans, sans-serif;\
  15.                 transform: translate(-50%, -50%) scale(1);\
  16.             }\
  17.             #cq-popup h3 {\
  18.                 font-size: 40px;\
  19.                 padding: 0;\
  20.                 width: 500px;\
  21.                 float: left;\
  22.                 text-align: left;\
  23.                 margin-bottom: 10px;\
  24.             }\
  25.             #cq-popup > div {\
  26.                 width: 500px;\
  27.                 font-size: 27px;\
  28.                 line-height: 36px;\
  29.             }\
  30.             #cq-popup-btclose {\
  31.                 text-decoration: none;\
  32.                 font-size: 29px;\
  33.                 position: absolute;\
  34.                 right: 10px;\
  35.                 top: 0px;\
  36.             }\
  37.             #cq-popup-bg {\
  38.                 cursor: pointer;\
  39.                 position: fixed;\
  40.                 top:0; \
  41.                 width: 100%; \
  42.                 height: 100%;\
  43.                 background: rgba(51,51,51,0.8);\
  44.                 z-index: 22;\
  45.             }\
  46.         </style>\
  47.       <div id="cq-popup-bg"></div>\
  48.             <div id="cq-popup">\
  49.               <a id="cq-popup-btclose" href="#">×</a>\
  50.               <h3>\
  51.                 Првиет\
  52.               </h3>\
  53.               <div>Привет Мир!</div>\
  54.             </div>\
  55.        </div>\
  56.      ';
  57.  
  58. var div = document.createElement('div');
  59. div.innerHTML = str;
  60. document.body.appendChild(div)
  61. document.getElementById('cq-popup-btclose').onclick = function () {
  62.  document.getElementById('cq-popup-bg').remove();
  63.  document.getElementById('cq-popup').remove();
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement