rubin3332

Untitled

Apr 18th, 2022
472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 4.03 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Document</title>
  8.     <link rel="stylesheet" href="style.css">
  9. </head>
  10. <body>
  11.  
  12.     <div id="panel">
  13.         <div id="gum">
  14.             <input type="checkbox" id="checkinput">
  15.             <label for="checkinput" OnClick="a()" style="cursor:pointer;width:58px;display:block;height:50px;position:fixed;-webkit-tap-highlight-color:rgba(0,0,0,0);"></label>
  16.             <label class="polosky" id="pol_1" for="checkinput" OnClick="a()"></label>
  17.             <label class="polosky" id="pol_2" for="checkinput" OnClick="a()"></label>
  18.             <label class="polosky" id="pol_3" for="checkinput" OnClick="a()"></label>
  19.         </div>
  20.             <h1>Calculator</h1>
  21.           <img src="logo.png" id="logo" style="width:50px;">
  22.     </div>
  23.  
  24.  
  25.  
  26. <div id="backpanel">
  27.     <div id="shapka"><div>
  28.         <div style="display: flexbox;">
  29.             <button type="button" class="menu-button" style="margin-top: 23.2%;">______________</button>
  30.             <button type="button" class="menu-button">______________</button>
  31.             <button type="button" class="menu-button">______________</button>
  32.             <button type="button" class="menu-button">______________</button>
  33.             <button type="button" class="menu-button">______________</button>
  34.             <button type="button" class="menu-button">______________</button>
  35.             <button type="button" class="menu-button">______________</button>
  36.             <button type="button" class="menu-button">______________</button>
  37.         </div>
  38.     </div>
  39. </div>
  40.  
  41. <div class="calc" id="ad" style="">
  42.     Hello My Friend!!!!!!!!
  43. </div>
  44.  
  45. <script src="main.js"></script>
  46. </body>
  47. </html>
  48.    
  49. файл css:
  50.     body{
  51.     background: #00BD39;
  52.     margin: 0%;
  53. }
  54.  
  55. #panel{
  56.     background-color: #238D43;
  57.     width: 100%;
  58.     min-height: 70px;
  59.     position: absolute;
  60. }
  61.  
  62. #gum{
  63.     margin-top: -8px;
  64.     margin-left: 20px;
  65.     position: absolute;
  66.     z-index: 5;
  67. }
  68.  
  69. .polosky{
  70.     display: block;
  71.     background: #BF4330;
  72.     width: 58px;
  73.     height: 9px;
  74.     margin-top: 6px;
  75.     border-radius: 8px;
  76.     transition: all 0.2s ease-in-out;
  77.     user-select: none;
  78.     cursor: pointer;
  79.     -webkit-tap-highlight-color:rgba(0,0,0,0);
  80. }
  81.  
  82. #checkinput:checked ~ .polosky {
  83.     transform: rotate(-410deg);
  84.     -webkit-transform: rotate(-410deg);
  85. }
  86.  
  87. #checkinput:checked ~ #pol_1 {
  88.     background: rgba(0, 0, 0, 0);
  89. }
  90.  
  91. #checkinput:checked ~ #pol_3 {
  92.     transform: rotate(-310deg);
  93.     margin-top: -9px;
  94.     -webkit-transform: rotate(-310deg);
  95. }
  96.  
  97. #checkinput{
  98.     visibility: hidden;
  99. }
  100.  
  101. #logo{
  102.     margin-left: 83%;
  103.     margin-top: 3%;
  104.     transition: all 0.3s ease-in-out;
  105.     position:absolute;
  106.     z-index: 5;
  107. }
  108.  
  109. h1{
  110.     color: white;
  111.     position: absolute;
  112.     margin-left: 26%;
  113.     font-family:'Courier New', Courier, monospace;
  114.     z-index: 5;
  115. }
  116.  
  117. #backpanel{
  118.     background:#007B25;
  119.     width:84%;
  120.     height: 1000px;
  121.     position: absolute;
  122.     margin-left: -85%;
  123.     transition: all 0.2s ease-in-out;
  124.     z-index: 4;
  125. }
  126.  
  127. #shapka{
  128.     background-color: #00BD39;
  129.     width: 100%;
  130.     height: 70px;
  131. }
  132.  
  133. .menu-button{
  134.     width: 100%;
  135.     height: 75px;
  136.     background-color: #64DE89;
  137.     border-color: #007B25;
  138.     border-width: 0.5px;
  139.     font-size: large;
  140.     border-right: none;
  141. }
  142.    
  143.     файл js:
  144.     function get_id(id){
  145.     return document.getElementById(id);
  146. }
  147.  
  148. function a(){
  149. let left = get_id("backpanel").style.marginLeft;
  150. if (left != '-2%'){
  151.     get_id("backpanel").style.marginLeft = '-2%';
  152.     get_id("logo").style.width = '65px';
  153.     get_id("logo").style.marginLeft = '82%';
  154.     get_id("logo").style.marginTop = '1%';
  155. }else{
  156.     get_id("backpanel").style.marginLeft = '-85%';
  157.     get_id("logo").style.width = '50px';
  158.     get_id("logo").style.marginLeft = '83%';
  159.     get_id("logo").style.marginTop = '3%';
  160.  
  161. }
  162. }
Advertisement
Add Comment
Please, Sign In to add comment