mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00

When a box does not have a top, left, bottom, or right, there is no need to adjust the offset for positioning relative to the padding edge, because the box remains in the normal flow.
15 lines
No EOL
363 B
HTML
15 lines
No EOL
363 B
HTML
<!DOCTYPE html>
|
|
<style>
|
|
.box {
|
|
position: relative;
|
|
padding-top: 50px;
|
|
}
|
|
|
|
.inner {
|
|
display: block;
|
|
position: absolute;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #FDDE5C 0%, #F8AB5E 16.66667%, #F56A62 33.33333%, #A176C8 50%, #759BEB 66.66667%, #65BEB3 83.33333%, #70DB96);
|
|
}
|
|
</style><div class="box"><div class="inner"></div></div> |