mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-30 15:02:56 +00:00
Now each test type has the same directories: - input - expected - data Also, tests can be in subdirectories within ./input.
53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/position-sticky-top-ref.html" />
|
|
<style>
|
|
.scrollable-container {
|
|
width: 300px;
|
|
height: 300px;
|
|
overflow-y: scroll;
|
|
border: 5px solid red;
|
|
}
|
|
|
|
.sticky-box {
|
|
position: sticky;
|
|
top: 50px;
|
|
width: 240px;
|
|
height: 80px;
|
|
background: #3498db;
|
|
color: white;
|
|
}
|
|
|
|
.box {
|
|
height: 500px;
|
|
background-color: orange;
|
|
}
|
|
</style>
|
|
|
|
<div class="scrollable-container" id="sticky-is-below-scrollport">
|
|
<div class="box"></div>
|
|
<div class="sticky-box">I stick within this scrollable box!</div>
|
|
<div class="box"></div>
|
|
</div>
|
|
|
|
<div class="scrollable-container" id="sticky-is-inside-scrollport">
|
|
<div class="box"></div>
|
|
<div class="sticky-box">I stick within this scrollable box!</div>
|
|
<div class="box"></div>
|
|
</div>
|
|
|
|
<div class="scrollable-container" id="sticky-is-above-scrollport">
|
|
<div class="box"></div>
|
|
<div class="sticky-box">I stick within this scrollable box!</div>
|
|
<div class="box"></div>
|
|
</div>
|
|
|
|
<script>
|
|
const stickyIsBelowScrollport = document.getElementById("sticky-is-below-scrollport");
|
|
stickyIsBelowScrollport.scrollTop = 0;
|
|
|
|
const stickyIsInsideScrollport = document.getElementById("sticky-is-inside-scrollport");
|
|
stickyIsInsideScrollport.scrollTop = 390;
|
|
|
|
const stickyIsAboveScrollport = document.getElementById("sticky-is-above-scrollport");
|
|
stickyIsAboveScrollport.scrollTop = 780;
|
|
</script>
|