HTML
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <title>CodeAtNow | Fruicy</title> <link rel="stylesheet" href="./style.css"> </head> <body> <!-- partial:index.partial.html --> <main> <div class="container"> <div class="top"> <img class="header" src="https://alieninterfaces.com/static/pages/04-fruicy//assets/header.png" /> </div> <div class="content"> <div class="info"> <h2>Treats and fun</h2> <nav> <navItem> <a href="#">one</a> </navItem> <navItem> <a href="#">two</a> </navItem> <navItem> <a href="#">three</a> </navItem> <button>yes</button> </nav> </div> <div class="grid"> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy//assets/smoothie.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/grapefruit.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/dessert.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/strawberry.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/unknown.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/icecream.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/unknown2.png" /> <div class="label">label</div> </div> </div> <div class="item-holder"> <div class="item"> <img src="https://alieninterfaces.com/static/pages/04-fruicy/assets/mysteryfruit.png" /> <div class="label">label</div> </div> </div> </div> </div> </div> </main> <!-- partial --> <script src='https://unpkg.co/gsap@3/dist/gsap.min.js'></script> <script src='https://assets.codepen.io/16327/ScrollSmoother.min.js'></script> <script src='https://assets.codepen.io/16327/MorphSVGPlugin3.min.js'></script> <script src='https://unpkg.com/gsap@3/dist/ScrollTrigger.min.js'></script><script src="./script.js"></script> </body> </html>
CSS
#link { z-index: 100; bottom: 0; left: 0; position: fixed; z-index: 1000; padding: 0.5rem 1rem; width: 100%; display: flex; justify-content: space-between; align-items: center; box-sizing: border-box; color: white; } #link a { text-decoration: none; color: currentColor; cursor: pointer; } #link a:hover { color: #d0656f; cursor: pointer; text-decoration: none; } #link .ai-link { display: flex; align-items: center; margin: 0.5rem 0; } #link .ai-link svg { margin-right: 0.5em; } body { background-color: #c7cbe4; color: #fff; font-family: "Futura PT", sans-serif; font-size: 16px; line-height: 1.5; margin: 0; padding: 0; display: flex; height: 110vh; overflow: hidden; width: 100vw; align-items: center; justify-content: center; overflow-x: clip; } main { position: relative; display: flex; justify-content: center; align-items: center; width: 100vw; } .container { position: relative; max-width: 900px; margin-bottom: 200px; } .top { position: relative; margin-bottom: -13%; width: 103%; z-index: 1; pointer-events: none; } .header { width: 100%; } .content { position: relative; background: #ffc7a3; background: linear-gradient(90deg, #d57589 0%, #ffc7a3 100%); left: 1.6%; width: 94.8%; min-height: 200px; border-radius: min(60px, 6vw); padding: 5%; padding-top: 10%; padding-bottom: 0; box-sizing: border-box; /* box-shadow: -5px 8px 40px rgba(0, 0, 0, 0.5); */ } .content::after { display: block; content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #4b0032; background: linear-gradient(180deg, #2e2c2f 0%, #2e2f2c 100%); transform: translate(-10%, 10%); z-index: -1; filter: blur(40px); mix-blend-mode: color-burn; opacity: 0.5; } .info { display: flex; justify-content: space-between; text-transform: uppercase; margin-bottom: 2%; } h2 { margin: 0; opacity: 0.9; } nav { display: flex; justify-content: space-between; align-items: center; flex: 1; max-width: 50%; } nav a { font-weight: 700; color: #fff; text-decoration: none; } nav a:hover { text-decoration: underline; } nav button { color: white; text-transform: uppercase; background: linear-gradient(180deg, #ea585f 0%, #f96b7b 100%); padding: 10px 20px; border: 0; border-radius: 20px; box-shadow: -2px 2px 3px rgba(0, 0, 0, 0.2); cursor: pointer; transition: transform 0.2s ease-in-out; } nav button:hover { transform: scale(1.1); } .grid { position: relative; top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: min(3vw, 30px); } .item-holder { position: relative; width: 100%; } .item-holder::after, .item-holder::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .item-holder::after { transform-origin: top left; transform: translateX(15px) rotate(45deg); background: linear-gradient(180deg, #113b5b 0%, rgba(17, 59, 91, 0.4) 30%, rgba(17, 59, 91, 0) 50%); mix-blend-mode: multiply; opacity: 0.2; filter: blur(3px); } .item-holder::before { transform: translate(-10%, 10%); background: black; mix-blend-mode: overlay; filter: blur(20px); opacity: 0.5; } .item { position: relative; display: flex; flex-direction: column; justify-content: space-between; width: 100%; height: 100%; /* box-shadow: -2px 4px 6px rgba(0, 0, 0, 0.3); */ border-radius: 20px 5px 15px 15px; background: blue; z-index: 1; } .item img { width: 100%; flex: 1; object-fit: contain; } .label { font-size: 0.7rem; padding: 20px 2em; padding-top: 0; box-sizing: border-box; text-transform: uppercase; } .item-holder:nth-child(1) .item { background: linear-gradient(90deg, #ecd6d8 0%, #f9e2d2 100%); } .item-holder:nth-child(2) .item, .item-holder:nth-child(7) .item { background: linear-gradient(90deg, #bf92f1 0%, #e4b3fa 100%); } .item-holder:nth-child(3) .item { background: linear-gradient(90deg, #69e7b7 0%, #9fffd6 100%); } .item-holder:nth-child(4) .item, .item-holder:nth-child(8) .item { background: linear-gradient(90deg, #febea7 0%, #fdf5d2 100%); } .item-holder:nth-child(5) .item { background: linear-gradient(90deg, #fd556b 0%, #ff8e80 100%); } .item-holder:nth-child(6) .item { background: linear-gradient(90deg, #f89e27 0%, #ffd054 100%); } @media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); } } @media (max-height: 500px) { #link { position: relative; } }
Follow Us On Telegram
Get Full Source Code Zipped File
Telegram link
0 Comments