Advertisement
Pearlfromsu

gaegaeg

Mar 15th, 2023
639
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 4.58 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="utf-8">
  5.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.         <title></title>
  7.         <meta name="description" content="">
  8.         <meta name="viewport" content="width=device-width, initial-scale=1">
  9.         <link rel="stylesheet" href="styles.css">
  10.         <style>
  11.             html {
  12.                 height: 100vh;
  13.                 width: 100vw;
  14.                 display: flex;
  15.             }
  16.             * {
  17.                 text-transform: uppercase;
  18.                 font-family: "Roboto",sans-serif;
  19.                 margin: 0;
  20.                 top: 0;
  21.                 padding: 0;
  22.                 box-sizing: border-box;
  23.                 white-space: pre-line;
  24.                 text-align: center;
  25.                 color: white;
  26.             }
  27.             body {
  28.                 height: 100%;
  29.                 overflow: auto;
  30.                 width: 100%;
  31.                 display: flex;
  32.                 align-items: center;
  33.                 justify-content: center;
  34.                 flex-direction: column;
  35.                 gap: 10px;
  36.                 background-color: #f4f4f4;
  37.                 position: relative;
  38.             }
  39.             h1 {
  40.                 margin: 0;
  41.             }
  42.             mark.green {
  43.                 color: #d46220; /*#DCB343;*/
  44.                 background:none;
  45.             }
  46.             img {
  47.                 max-height: 50vh;
  48.                 max-width: 50vw;
  49.                 object-fit: scale-down;
  50.                 background-color: white;
  51.                 border-radius: 80px;
  52.                 background: rgb(2,0,36);
  53. background: linear-gradient(130deg, #f0cb24 0%, rgba(43, 42, 41, 1) 50%, rgba(2,0,36,1) 100%);
  54.             }
  55.  
  56. .form__group {
  57.   position: relative;
  58.   padding: 15px 0 0;
  59.   margin-top: 10px;
  60.   width: 50%;
  61. }
  62.  
  63. .form__field {
  64.   font-family: inherit;
  65.   width: 100%;
  66.   border: 0;
  67.   border-bottom: 2px solid #9b9b9b;
  68.   outline: 0;
  69.   font-size: 1.3rem;
  70.   color: #fff;
  71.   padding: 7px 0;
  72.   background: transparent;
  73.   transition: border-color 0.2s;
  74.  
  75. }
  76. .form__field::placeholder {
  77.     color: transparent;
  78.   }
  79. .form__field:placeholder-shown ~ .form__label {
  80.     font-size: 1.3rem;
  81.     cursor: text;
  82.     top: 20px;
  83.   }
  84.  
  85. .form__label {
  86.   position: absolute;
  87.   top: 0;
  88.   display: block;
  89.   transition: 0.2s;
  90.   font-size: 1rem;
  91.   color: #9b9b9b;
  92. }
  93.  
  94. .form__field:focus {
  95.   padding-bottom: 6px;  
  96.   border-bottom-width: 3px;
  97.   border-image: linear-gradient(to right, #11998e,#38ef7d);
  98.   border-image-slice: 1;
  99. }
  100. /* reset input */
  101. .form__field{
  102.   &:required,&:invalid { box-shadow:none; }
  103. }
  104. /* demo */
  105. body {
  106.   font-family: 'Poppins', sans-serif;
  107.   display: flex;
  108.   flex-direction: column;
  109.   justify-content: center;
  110.   align-items: center;
  111.   min-height: 100vh;
  112.   font-size: 1.5rem;
  113.   background-color:#222222;
  114. }
  115.         </style>
  116.     </head>
  117.     <body>
  118.         <!-- <div class = "circlee"></div> -->
  119.         <div height="100px" style="position: relative; display: flex;">
  120.             <div>
  121.                 <div class="form__group field">
  122.                     <label for="i1" class="form__label">Volt</label>
  123.                     <input type="input" class="form__field" placeholder="Name" id='i1' />
  124.                 </div>
  125.             </div>
  126.             <div>
  127.                 <div class="form__group field">
  128.                     <label for="i2" class="form__label">Gerc</label>
  129.                     <input type="input" class="form__field" placeholder="Name" id='i2' />
  130.                 </div>
  131.             </div>
  132.         </div>
  133.         <div style="position: relative; display: flex; width: 1000px">
  134.             <div style="flex: 1 0 1; width: 50%;text-align: center;" id = "l1"></div>
  135.             <div style="flex: 1 0 1; width: 50%;text-align: center;" id = "l2" width="500"></div>
  136.         </div>
  137.     </body>
  138.     <script>
  139.         document.getElementById("i1").addEventListener("keypress", function(event) {
  140.             if (event.key !== "Enter")
  141.                 return;
  142.             event.preventDefault();
  143.             var txt = document.getElementById("i1").value;
  144.             document.getElementById("l1").append(`${txt} Volt = ${(+txt/0.2).toPrecision(2)} smm\n`);
  145.  
  146. });
  147.         document.getElementById("i2").addEventListener("keypress", function(event) {
  148.             if (event.key !== "Enter")
  149.                 return;
  150.             event.preventDefault();
  151.            
  152.             var txt = document.getElementById("i2").value;
  153.             document.getElementById("l2").append(`${txt} Gerc = ${(+txt/150).toPrecision(2)} sm\n`);
  154. });
  155.  
  156.     </script>
  157. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement