Advertisement
desito07

Position Playground 100 Judge

Feb 3rd, 2022
902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.59 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6.     <title>Positioning Playground</title>
  7.     <link rel="stylesheet" href="styleJudge100.css">
  8. </head>
  9. <body>
  10.     <div class="viewport">
  11.         <section class="card">
  12.             <img class="pic1" src="./images/picture1.jpg" alt="Pic1">
  13.             <i class="fas fa-link"></i>
  14.         </section>
  15.     </div>
  16.     <div class="viewport">
  17.         <section class="card">
  18.             <img class="pic2" src="./images/picture2.jpg" alt="Pic2">
  19.             <i class="fas fa-star"></i>
  20.         </section>
  21.     </div>
  22. </body>
  23. </html>
  24.  
  25. _________________________________________________________________________
  26.  
  27. @import url("https://use.fontawesome.com/releases/v5.15.4/css/all.css");
  28.  
  29. body {
  30.     margin: 0;
  31. }
  32.  
  33. section.card {
  34.     height: 100vh;
  35.     display: block;
  36.     position: absolute;
  37. }
  38.  
  39. section.card:nth-child(1) {
  40.     background: rgb(31,97,155);
  41. background: linear-gradient(90deg, rgba(31,97,155,1) 0%, rgba(74,203,163,1) 100%);
  42. }
  43.  
  44. section.card:nth-child(2) {
  45.     background: rgb(166,54,118);
  46. background: linear-gradient(90deg, rgba(166,54,118,1) 0%, rgba(171,105,32,1) 100%);
  47. }
  48.  
  49. .pic1 {
  50.     position: absolute;
  51.     left: 33%;
  52.     top: 32%;
  53. }
  54.  
  55. .pic2 {
  56.     position: absolute;
  57.     left: 33%;
  58.     top: 101%;
  59. }
  60.  
  61. i {
  62.     color: white;
  63.  }
  64.  
  65.  section.card:nth-child(1) i {
  66.     position: absolute;
  67.     top: 72%;
  68.     left: 63%;
  69. }
  70.  
  71. section.card:nth-child(2) i {
  72.     position: absolute;
  73.     top: 10%;
  74.     left: 63%;
  75. }
  76.    
  77.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement