mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
46 lines
1011 B
HTML
46 lines
1011 B
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/position-sticky-nested-with-transform-ref.html" />
|
|
<style>
|
|
.scrollable-container {
|
|
width: 400px;
|
|
height: 200px;
|
|
overflow-y: scroll;
|
|
border: 5px solid red;
|
|
}
|
|
|
|
.outer-sticky {
|
|
position: sticky;
|
|
top: 0px;
|
|
width: 350px;
|
|
height: 100px;
|
|
background: #3498db;
|
|
transform: translateX(20px);
|
|
}
|
|
|
|
.inner-sticky {
|
|
position: sticky;
|
|
top: 30px;
|
|
width: 200px;
|
|
height: 40px;
|
|
background: #e74c3c;
|
|
}
|
|
|
|
.spacer {
|
|
height: 300px;
|
|
background-color: orange;
|
|
}
|
|
</style>
|
|
|
|
<div class="scrollable-container" id="container">
|
|
<div class="spacer"></div>
|
|
<div class="outer-sticky">
|
|
<div class="inner-sticky"></div>
|
|
</div>
|
|
<div class="spacer"></div>
|
|
</div>
|
|
|
|
<script>
|
|
// Outer sticky has a transform, inner sticky is nested inside
|
|
document.getElementById("container").scrollTop = 320;
|
|
</script>
|