mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
add_clip_rect() accepts a rectangle in viewport-relative coordinates, so it must be translated by the enclosing scroll offset to be displayed correctly inside a scrollable box.
24 lines
454 B
HTML
24 lines
454 B
HTML
<!DOCTYPE html>
|
|
<style type="text/css">
|
|
* {
|
|
scrollbar-width: none;
|
|
}
|
|
|
|
.box {
|
|
width: 180px;
|
|
height: 64px;
|
|
background: linear-gradient(rgb(109, 152, 204), rgb(138, 100, 229));
|
|
border-radius: 100px;
|
|
}
|
|
|
|
.scrollable {
|
|
width: 200px;
|
|
height: 200px;
|
|
overflow: scroll;
|
|
border: 10px solid orchid;
|
|
}
|
|
</style>
|
|
<div class="scrollable">
|
|
<div class="box"></div>
|
|
</div>
|