Advertisement
avr39-ripe

colorPicker.html

Apr 24th, 2020
564
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.62 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>Random</title>
  6.     <style>
  7.         html,
  8.         body {
  9.             display: flex;
  10.             align-items: center;
  11.             justify-content: center;
  12.             width: 95%;
  13.             height: 95%;
  14.             min-width: 810px;
  15.             min-height: 410px;
  16.             align-items: center;
  17.             margin: 8px 15px;
  18.         }
  19.  
  20.         .centered {
  21.             display: flex;
  22.             flex-direction: row;
  23.             align-items: center;
  24.             justify-content: center;
  25.             padding: 50px;
  26.         }
  27.         #main {
  28.             width: 100%;
  29.             height: 50%;
  30.             flex-direction: column;
  31.         }
  32.         #rgbContainer {
  33.             width: 100%;
  34.             height: 50%;
  35.             background-color: grey;
  36.             border: 2px solid black;
  37.         }
  38.         .colorBlock {
  39.             width: 30%;
  40.             height: 95%;
  41.             margin: auto;
  42.             display: flex;
  43.             flex-direction: column;
  44.             align-items: center;
  45.             justify-content: center;
  46.             border: 4px solid white;
  47.         }
  48.         #red {
  49.             background-color: red;
  50.         }
  51.         #green {
  52.             background-color: green;
  53.         }
  54.         #blue {
  55.             background-color: blue;
  56.         }
  57.         .changeButtons {
  58.             margin: 10px;
  59.             width: 12%;
  60.             color: white;
  61.             font-size: 15px;
  62.             font-weight: bold;
  63.             background-color: inherit;
  64.         }
  65.     </style>
  66. </head>
  67. <body>
  68.     <div id="main" class="centered">
  69.         <div id="rgbContainer" class="centered" tabindex="1">
  70.             <div id="red" class="colorBlock">
  71.                 <button id="pRed" class="changeButtons">+</button>
  72.                 <input id="inRed" type="number" min="0" max="255" step="1">
  73.                 <button id="mRed" class="changeButtons">-</button>
  74.             </div>
  75.             <div id="green" class="colorBlock">
  76.                 <button id="pGreen" class="changeButtons">+</button>
  77.                 <input id="inGreen" type="number" min="0" max="255" step="1">
  78.                 <button id="mGreen" class="changeButtons">-</button>
  79.             </div>
  80.             <div id="blue" class="colorBlock">
  81.                 <button id="pBlue" class="changeButtons">+</button>
  82.                 <input id="inBlue" type="number" min="0" max="255" step="1">
  83.                 <button id="mBlue" class="changeButtons">-</button>
  84.             </div>
  85.         </div>
  86.     </div>
  87.  
  88.     <script src="./colorPicker.js"></script>
  89. </body>
  90.  
  91. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement