Premium Gym Fitness Slider
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Premium Gym & Fitness Slider</title> <!-- Premium Google Fonts: Oswald (Bold/Aggressive) & Poppins (Modern Clean) --> <link href="https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Poppins:ital,wght@0,400;0,600;1,800&display=swap" rel="stylesheet"> <!-- Swiper CSS --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css" /> <!-- FontAwesome for Bold Arrows --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <div class="swiper gym-slider"> <div class="swiper-wrapper"> <!-- SLIDE 1: Strength / Bodybuilding --> <div class="swiper-slide"> <!-- RELIABLE PEXELS IMAGE --> <div class="slide-bg" style="background-image: url('https://images.pexels.com/photos/841130/pexels-photo-841130.jpeg?auto=compress&cs=tinysrgb&w=1920&q=80');"></div> <div class="overlay"></div> <div class="bg-text">STRENGTH</div> <div class="content"> <div class="badge"><span>Build Muscle</span></div> <h1 class="title">Unleash Your<br><span class="highlight">Inner Beast</span></h1> <p class="desc">Push beyond your limits. Our high-performance equipment and expert trainers will help you build the physique you've always wanted.</p> <a href="#" class="btn-gym"><span>Start Free Trial</span></a> </div> </div> <!-- SLIDE 2: Endurance / Crossfit --> <div class="swiper-slide"> <div class="slide-bg" style="background-image: url('https://images.pexels.com/photos/2261477/pexels-photo-2261477.jpeg?auto=compress&cs=tinysrgb&w=1920&q=80');"></div> <div class="overlay"></div> <div class="bg-text">ENDURANCE</div> <div class="content"> <div class="badge"><span>Cross Training</span></div> <h1 class="title">Conquer Every<br><span class="highlight">Challenge</span></h1> <p class="desc">High-intensity interval training designed to burn fat, build stamina, and forge an unbreakable mindset.</p> <a href="#" class="btn-gym"><span>View Classes</span></a> </div> </div> <!-- SLIDE 3: Determination / Boxing/Cardio --> <div class="swiper-slide"> <div class="slide-bg" style="background-image: url('https://images.pexels.com/photos/4720236/pexels-photo-4720236.jpeg?auto=compress&cs=tinysrgb&w=1920&q=80');"></div> <div class="overlay"></div> <div class="bg-text">POWER</div> <div class="content"> <div class="badge"><span>Elite Coaching</span></div> <h1 class="title">No Excuses.<br><span class="highlight">Just Results.</span></h1> <p class="desc">Join a community of dedicated athletes. Transform your body, elevate your mind, and dominate your fitness goals.</p> <a href="#" class="btn-gym"><span>Join The Pack</span></a> </div> </div> </div> <!-- Custom Angled Navigation --> <div class="gym-nav"> <div class="gym-btn-prev"><i class="fas fa-chevron-left"></i></div> <div class="gym-btn-next"><i class="fas fa-chevron-right"></i></div> </div> <!-- Pagination (Dash Style) --> <div class="swiper-pagination"></div> </div> <!-- Swiper JS --> <script src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js"></script> </body> </html>
CSS
/* === RESET & VARIABLES === */ :root { --primary-color: #ff2a2a; /* Hardcore Neon Red */ --dark-bg: #0a0a0a; --text-light: #ffffff; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background-color: var(--dark-bg); color: var(--text-light); overflow-x: hidden; } /* === SLIDER CONTAINER === */ .gym-slider { width: 100vw; height: 100vh; position: relative; background-color: var(--dark-bg); } .swiper-slide { position: relative; display: flex; align-items: center; justify-content: flex-start; padding: 0 8%; overflow: hidden; } /* === BACKGROUND IMAGES (Reliable Links) === */ .slide-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center top; z-index: 1; /* Extra zoom for motion effect */ transform: scale(1.2); transition: transform 6s cubic-bezier(0.25, 0.46, 0.45, 0.94); } .swiper-slide-active .slide-bg { transform: scale(1); /* Snappy zoom in */ } /* Dark Vignette Overlay to make text POP */ .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.85) 100%); z-index: 2; } /* === MASSIVE BACKGROUND STROKE TEXT === */ .bg-text { position: absolute; top: 50%; right: -5%; transform: translateY(-50%); font-family: 'Oswald', sans-serif; font-size: 15vw; /* Responsive massive text */ font-weight: 700; text-transform: uppercase; color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.05); /* Outline only */ z-index: 2; white-space: nowrap; pointer-events: none; } /* === SLIDE CONTENT === */ .content { position: relative; z-index: 10; max-width: 700px; } /* Subtitle / Category Badge */ .badge { display: inline-block; background-color: var(--primary-color); color: #fff; font-family: 'Oswald', sans-serif; font-size: 1.2rem; text-transform: uppercase; letter-spacing: 2px; padding: 5px 15px; transform: skewX(-15deg); /* Aggressive Skew */ margin-bottom: 20px; } .badge span { display: inline-block; transform: skewX(15deg); /* Un-skew text inside */ } /* Main Heading */ .title { font-family: 'Oswald', sans-serif; font-size: 6rem; font-weight: 700; line-height: 1; text-transform: uppercase; margin-bottom: 20px; text-shadow: 4px 4px 0px rgba(0,0,0,0.5); /* Split color effect */ color: #fff; } .title span.highlight { color: var(--primary-color); } /* Description */ .desc { font-size: 1.1rem; font-weight: 400; color: #ccc; margin-bottom: 40px; border-left: 4px solid var(--primary-color); padding-left: 15px; max-width: 500px; } /* CTA Button */ .btn-gym { display: inline-flex; align-items: center; justify-content: center; padding: 15px 40px; background: #fff; color: #000; font-family: 'Oswald', sans-serif; font-size: 1.2rem; font-weight: 700; text-transform: uppercase; text-decoration: none; letter-spacing: 1px; transform: skewX(-15deg); transition: all 0.3s ease; position: relative; overflow: hidden; } .btn-gym span { transform: skewX(15deg); position: relative; z-index: 2; } .btn-gym::before { content: ''; position: absolute; top: 0; left: 0; width: 0%; height: 100%; background: var(--primary-color); transition: width 0.4s ease; z-index: 1; } .btn-gym:hover { color: #fff; } .btn-gym:hover::before { width: 100%; } /* === EXPLOSIVE ANIMATIONS === */ /* Start State (Hidden & Pushed Left) */ .badge, .title, .desc, .btn-gym { opacity: 0; transform: translateX(-100px) skewX(-15deg); /* Combining translate and skew */ transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bounce effect */ } /* Un-skew specific overrides */ .title, .desc { transform: translateX(-100px); } /* Active State (Visible with Staggered Delays) */ .swiper-slide-active .badge { opacity: 1; transform: translateX(0) skewX(-15deg); transition-delay: 0.4s; } .swiper-slide-active .title { opacity: 1; transform: translateX(0); transition-delay: 0.6s; } .swiper-slide-active .desc { opacity: 1; transform: translateX(0); transition-delay: 0.8s; } .swiper-slide-active .btn-gym { opacity: 1; transform: translateX(0) skewX(-15deg); transition-delay: 1s; } /* Parallax text effect for Background Text */ .swiper-slide-active .bg-text { transform: translateY(-50%) translateX(-50px); transition: transform 6s ease-out; } /* === CUSTOM GYM NAVIGATION === */ .gym-nav { position: absolute; bottom: 50px; right: 8%; z-index: 20; display: flex; gap: 15px; } .gym-btn-next, .gym-btn-prev { width: 60px; height: 60px; background: transparent; border: 2px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.5rem; cursor: pointer; transition: all 0.3s ease; transform: skewX(-15deg); } .gym-btn-next i, .gym-btn-prev i { transform: skewX(15deg); } .gym-btn-next:hover, .gym-btn-prev:hover { background: var(--primary-color); border-color: var(--primary-color); box-shadow: 0 0 20px rgba(255, 42, 42, 0.5); } /* Pagination Numbers */ .swiper-pagination { position: absolute; bottom: 60px !important; left: 8% !important; text-align: left !important; width: auto !important; } .swiper-pagination-bullet { width: 30px; height: 4px; border-radius: 0; background: rgba(255,255,255,0.3); opacity: 1; transition: all 0.3s; } .swiper-pagination-bullet-active { background: var(--primary-color); width: 60px; /* Expands on active */ box-shadow: 0 0 10px rgba(255, 42, 42, 0.8); } /* === RESPONSIVE DESIGN === */ @media (max-width: 992px) { .title { font-size: 4rem; } .bg-text { font-size: 20vw; right: -10%; } } @media (max-width: 768px) { .title { font-size: 3rem; } .desc { font-size: 1rem; } .gym-nav { display: none; } /* Hide arrows on mobile, keep swipe & bullets */ .swiper-slide { padding: 0 5%; } .bg-text { display: none; } /* Hide massive text on mobile to keep it clean */ }
JavaScript
const swiper = new Swiper('.gym-slider', { // Speed of the slide transition speed: 800, loop: true, // "Creative" effect makes the sliding look aggressive and 3D effect: 'creative', creativeEffect: { prev: { shadow: true, translate: ['-20%', 0, -1], }, next: { translate: ['100%', 0, 0], }, }, autoplay: { delay: 5000, // 5 seconds per slide disableOnInteraction: false, }, navigation: { nextEl: '.gym-btn-next', prevEl: '.gym-btn-prev', }, pagination: { el: '.swiper-pagination', clickable: true, }, });
Output Preview
Desktop
Mobile
Fullscreen