<div class="container">
<div class="scene">
<div class="element">
<div class="inner">内部元素,Bottom=0, right=0</div>
</div>
</div>
</div>
.scroll {
overflow auto
}
.scene {
height 200vh
width 200vw
padding 10vh 10vw
background gray
}
.container {
width 80vw
height 80vh
background lightgray
border 1px solid black
overflow auto
}
.element {
width 50vw
height 50vh
background red
position sticky
top 5vh
left 5vw
border 1px solid black
}
.inner {
background blue
position absolute
right 0
bottom 0
color white
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.