Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Positioning Playground</title>
- <link rel="stylesheet" href="styleJudge100.css">
- </head>
- <body>
- <div class="viewport">
- <section class="card">
- <img class="pic1" src="./images/picture1.jpg" alt="Pic1">
- <i class="fas fa-link"></i>
- </section>
- </div>
- <div class="viewport">
- <section class="card">
- <img class="pic2" src="./images/picture2.jpg" alt="Pic2">
- <i class="fas fa-star"></i>
- </section>
- </div>
- </body>
- </html>
- _________________________________________________________________________
- @import url("https://use.fontawesome.com/releases/v5.15.4/css/all.css");
- body {
- margin: 0;
- }
- section.card {
- height: 100vh;
- display: block;
- position: absolute;
- }
- section.card:nth-child(1) {
- background: rgb(31,97,155);
- background: linear-gradient(90deg, rgba(31,97,155,1) 0%, rgba(74,203,163,1) 100%);
- }
- section.card:nth-child(2) {
- background: rgb(166,54,118);
- background: linear-gradient(90deg, rgba(166,54,118,1) 0%, rgba(171,105,32,1) 100%);
- }
- .pic1 {
- position: absolute;
- left: 33%;
- top: 32%;
- }
- .pic2 {
- position: absolute;
- left: 33%;
- top: 101%;
- }
- i {
- color: white;
- }
- section.card:nth-child(1) i {
- position: absolute;
- top: 72%;
- left: 63%;
- }
- section.card:nth-child(2) i {
- position: absolute;
- top: 10%;
- left: 63%;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement