LudOkapi's picture
can you make this work correctly
833b632 verified
Raw History Blame Contribute Delete
3.06 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diagonal Scroll</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script>
</head>
<body class="overflow-hidden">
<diagonal-navbar></diagonal-navbar>
<diagonal-footer></diagonal-footer>
<div id="diagonal-scroll-container">
<div id="content-wrapper">
<section class="panel bg-gradient-to-br from-indigo-500 to-purple-600 w-screen h-screen flex items-center justify-center">
<div class="text-center max-w-2xl px-4">
<h1 class="text-5xl md:text-7xl font-bold text-white mb-6">Scroll Diagonally</h1>
<p class="text-xl text-white opacity-90 mb-8">A unique scrolling experience that breaks the vertical convention</p>
<div class="animate-bounce">
<i data-feather="arrow-down-right" class="text-white w-12 h-12"></i>
</div>
</div>
</section>
<section class="panel bg-gradient-to-br from-amber-500 to-pink-500 w-screen h-screen flex items-center justify-center">
<div class="text-center max-w-2xl px-4">
<h2 class="text-4xl md:text-6xl font-bold text-white mb-6">How Does It Work?</h2>
<p class="text-xl text-white opacity-90 mb-8">We're using GSAP's ScrollTrigger to transform the viewport on scroll</p>
</div>
</section>
<section class="panel bg-gradient-to-br from-emerald-500 to-teal-600 w-screen h-screen flex items-center justify-center">
<div class="text-center max-w-2xl px-4">
<h2 class="text-4xl md:text-6xl font-bold text-white mb-6">Try Scrolling</h2>
<p class="text-xl text-white opacity-90 mb-8">Notice how the content moves diagonally instead of vertically</p>
</div>
</section>
<section class="panel bg-gradient-to-br from-rose-500 to-fuchsia-600 w-screen h-screen flex items-center justify-center">
<div class="text-center max-w-2xl px-4">
<h2 class="text-4xl md:text-6xl font-bold text-white mb-6">Mobile Friendly</h2>
<p class="text-xl text-white opacity-90">This effect works on all device sizes</p>
</div>
</section>
</div>
</div>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
</script>
</body>
</html>