Advertisement
Patrikrizek

lesson-3-bacground-pattern

Jun 23rd, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.75 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.     <style>
  9.         html, body {
  10.             margin: 0;
  11.             padding: 0;
  12.         }
  13.      
  14.  
  15.         body {        
  16.             position: fixed;
  17.             width: 100vw;
  18.             height: 100vh;
  19.  
  20.             /* Following 4 properties are copied from website:
  21.             https://www.magicpattern.design/tools/css-backgrounds */
  22.             background-color: wheat;
  23.             opacity: 1;
  24.             background-image: radial-gradient(#000000 1px, antiquewhite 1px);
  25.             background-size: 40px 40px;
  26.  
  27.             display: flex;
  28.             justify-content: center;
  29.         }
  30.  
  31.         .test {
  32.             background-color: white;
  33.             box-shadow: 5px 5px 0 black;
  34.             border-radius: 5%;
  35.             border: 2px solid black;
  36.             height: fit-content;
  37.             width: 20rem;
  38.             padding: 20px;
  39.             margin-top: 50px;
  40.         }
  41.        
  42.         .test:hover {
  43.             box-shadow: 10px 10px 0 black;
  44.         }
  45.        
  46.         .test h1, p {
  47.             display: flex;
  48.             justify-content: center;
  49.             align-items: center;
  50.        
  51.         }
  52.     </style>
  53. </head>
  54. <body>
  55.     <div class="pattern">
  56.         <div class="test">
  57.             <h1>Hello</h1>
  58.             <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus rem, quidem ex odit ducimus explicabo earum reprehenderit esse, at architecto, modi unde. Accusantium iure in atque voluptatum officiis dolorum repellendus!</p>
  59.         </div>
  60.     </div>
  61. </body>
  62. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement