webupdate
This commit is contained in:
131
website/public/sticky-test-inline.html
Normal file
131
website/public/sticky-test-inline.html
Normal file
@@ -0,0 +1,131 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Sticky Test - Inline CSS</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
/* STICKY NAVBAR - This should work */
|
||||
.sticky-navbar-wrapper {
|
||||
position: -webkit-sticky;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
background: #FFD0D0;
|
||||
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.navbar-content {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.navbar-title {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #202023;
|
||||
}
|
||||
|
||||
.navbar-status {
|
||||
background: #4CAF50;
|
||||
color: white;
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 40px 20px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.section {
|
||||
background: white;
|
||||
padding: 40px;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 8px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.section h2 {
|
||||
color: #202023;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.scroll-indicator {
|
||||
position: fixed;
|
||||
bottom: 20px;
|
||||
right: 20px;
|
||||
background: #FFD0D0;
|
||||
padding: 15px 25px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- THIS IS THE STICKY NAVBAR -->
|
||||
<div class="sticky-navbar-wrapper">
|
||||
<div class="navbar-content">
|
||||
<div class="navbar-title">🔍 STICKY NAVBAR TEST</div>
|
||||
<div class="navbar-status">I should stay at top when scrolling ↓</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CONTENT TO SCROLL -->
|
||||
<div class="content">
|
||||
<div class="section">
|
||||
<h2>Section 1 - Start Scrolling</h2>
|
||||
<p style="font-size: 18px; line-height: 1.8;">
|
||||
If the pink navbar above stays visible while you scroll, then position: sticky is working correctly.
|
||||
<br><br>
|
||||
<strong>What to look for:</strong>
|
||||
<br>• The pink navbar should remain at the top of the window
|
||||
<br>• It should NOT scroll away with the content
|
||||
<br>• The green badge should always be visible
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Section 2 - Keep Scrolling</h2>
|
||||
<p style="font-size: 18px;">Continue scrolling down to test the sticky behavior...</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Section 3 - More Scrolling</h2>
|
||||
<p style="font-size: 18px;">The navbar should still be at the top...</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Section 4 - Almost There</h2>
|
||||
<p style="font-size: 18px;">Keep going...</p>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Section 5 - Final Test</h2>
|
||||
<p style="font-size: 18px;">
|
||||
If you can still see the pink navbar at the top, it's working!
|
||||
<br><br>
|
||||
If it scrolled away, there's a browser or CSS issue preventing sticky positioning.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="scroll-indicator">
|
||||
Scroll to test ↑↓
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user