Open this example in the interactive library
Source code
<style>
.demo + .demo {
margin-top: -0.375rem;
margin-left: 1rem;
}
</style>
<div class="demo">First</div>
<div class="demo">Second</div>
Negative margin overlap with native CSS. The preview includes a small shared demo stylesheet.
Open this example in the interactive library
<style>
.demo + .demo {
margin-top: -0.375rem;
margin-left: 1rem;
}
</style>
<div class="demo">First</div>
<div class="demo">Second</div>