Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- ====================================================================== CSS - Place this in your <head> or in an external stylesheet. ====================================================================== --> <style> :root { --nah-min-height: 500px; --nah-padding: 2rem 1.5rem; --nah-text-color: #ffffff; --nah-overlay-color: rgba(0, 0, 0, 0.5); --nah-cta-bg: #ffffff; --nah-cta-text-color: #000000; --nah-cta-hover-bg: #f0f0f0; /* Image by ian dooley from Unsplash - for demonstration */ --nah-background-image: url('https://images.unsplash.com/photo-1490481651871-ab68de25d43d?q=80&w=1200'); } .new-arrival-hero { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; position: relative; width: 100%; min-height: var(--nah-min-height); padding: var(--nah-padding); color: var(--nah-text-color); display: flex; justify-content: center; align-items: center; text-align: center; background-image: var(--nah-background-image); background-size: cover; background-position: center; } .new-arrival-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--nah-overlay-color); z-index: 1; } .new-arrival-hero * { box-sizing: border-box; } .new-arrival-hero-content { position: relative; z-index: 2; max-width: 600px; } .new-arrival-hero-title { margin: 0 0 1rem 0; font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; line-height: 1.2; } .new-arrival-hero-tagline { margin: 0 0 1.5rem 0; font-size: clamp(1rem, 2.5vw, 1.25rem); opacity: 0.9; line-height: 1.5; } .new-arrival-hero-cta { display: inline-block; background-color: var(--nah-cta-bg); color: var(--nah-cta-text-color); border: none; padding: 0.8rem 2.2rem; font-size: 1rem; font-weight: 600; border-radius: 5px; text-decoration: none; cursor: pointer; transition: background-color 0.3s ease; } .new-arrival-hero-cta:hover { background-color: var(--nah-cta-hover-bg); } </style> <!-- ====================================================================== HTML - Place this in your <body> where you want the component to appear. ====================================================================== --> <section class="new-arrival-hero"> <div class="new-arrival-hero-content"> <h1 class="new-arrival-hero-title">The Terra Collection</h1> <p class="new-arrival-hero-tagline"> Embrace earthy tones and natural fabrics. Our new line is designed for comfort, style, and a connection to the world around us. </p> <a href="#" role="button" class="new-arrival-hero-cta">Explore the Collection</a> </div> </section>