Doramis_Studio

Windows 10 Window Test

Oct 15th, 2021 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.26 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Windows 10</title>
  5. <style>body {overflow: hidden;user-select: none;-webkit-user-select: none;-ie-user-select: none;}</style>
  6. <link type="text/css" rel="stylesheet" href="file:///C:/Users/AkarinPC/Documents/HTML/Windows10/css/windowStyle.css"><!-- External / my local css style -->
  7. <style>
  8. .window {
  9.     position: absolute;
  10.     top: 0px;
  11.     left: 0px;
  12.     background: #7A7574;
  13.     border: 1px solid #84807F;
  14.     display: inline-block;
  15. }
  16.  
  17. .content {
  18.     position: relative;
  19.     margin: 0px 0px -4px 0px;
  20.     height: 480px;
  21.     width: 800px;
  22.     min-height: 100px;
  23.     min-width: 160px;
  24.     background: white;
  25.     -webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
  26.     box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
  27.     border: none;
  28.     outline: none;
  29.     resize: both;
  30. }
  31.  
  32. button[type=close] {
  33.     float: right;
  34.     width: 45px;
  35.     height: 28px;
  36.     background: #e8112300;
  37.     color: white;
  38.     font-size: 20px;
  39.     font-weight: 100;
  40.     border: none;
  41.     outline: none;
  42.     z-index: 2;
  43. }
  44.  
  45. button[type=close]:hover {
  46.     background: #e81123;
  47. }
  48.  
  49. button[type=close]:active {
  50.     background: #bc3942;
  51. }
  52. button[type=help] {
  53.     float: right;
  54.     width: 45px;
  55.     height: 28px;
  56.     background: #e8112300;
  57.     color: white;
  58.     font-size: 15px;
  59.     font-weight: 100;
  60.     border: none;
  61.     outline: none;
  62.     z-index: 2;
  63. }
  64.  
  65. button[type=help]:hover {
  66.     background: #888382;
  67. }
  68.  
  69. button[type=help]:active {
  70.     background: #95918f;
  71. }
  72.  
  73. div .header {
  74.     position: absolute;
  75.     top: 0px;
  76.     left: 7px;
  77.     height: 30px;
  78.     width: 89%;
  79.     color: white;
  80.     font-family: 'Arial';
  81.     font-size: 11px;
  82. }
  83. </style>
  84. </head>
  85. <body>
  86.  
  87. <div class="window" id="window">
  88.  <div class="header" id="windowheader"><span style="position: relative;top: 7px;">WinCopy Platform</span></div>
  89.  <div>
  90.   <button type="close">тип</button>
  91.   <button type="help">?</button>
  92.  </div>
  93.  <!-- Here you can edit the source -->
  94.  <iframe class="content" src="file:///C:/Users/AkarinPC/Documents/HTML/TextArea.html"></iframe>
  95. </div>
  96.  
  97. <script>
  98. dragElement(document.getElementById("window"));
  99.  
  100. function dragElement(elmnt) {
  101.   var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
  102.   if (document.getElementById(elmnt.id + "header")) {
  103.     /* if present, the header is where you move the DIV from:*/
  104.     document.getElementById(elmnt.id + "header").onmousedown = dragMouseDown;
  105.   } else {
  106.     /* otherwise, move the DIV from anywhere inside the DIV:*/
  107.     elmnt.onmousedown = dragMouseDown;
  108.   }
  109.  
  110.   function dragMouseDown(e) {
  111.     e = e || window.event;
  112.     e.preventDefault();
  113.     // get the mouse cursor position at startup:
  114.     pos3 = e.clientX;
  115.     pos4 = e.clientY;
  116.     document.onmouseup = closeDragElement;
  117.     // call a function whenever the cursor moves:
  118.     document.onmousemove = elementDrag;
  119.   }
  120.  
  121.   function elementDrag(e) {
  122.     e = e || window.event;
  123.     e.preventDefault();
  124.     // calculate the new cursor position:
  125.     pos1 = pos3 - e.clientX;
  126.     pos2 = pos4 - e.clientY;
  127.     pos3 = e.clientX;
  128.     pos4 = e.clientY;
  129.     // set the element's new position:
  130.     elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
  131.     elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
  132.   }
  133.  
  134.   function closeDragElement() {
  135.     /* stop moving when mouse button is released:*/
  136.     document.onmouseup = null;
  137.     document.onmousemove = null;
  138.   }
  139. }
  140. </script>
  141.  
  142. </body>
  143. </html>
Add Comment
Please, Sign In to add comment