Skip to content

Instantly share code, notes, and snippets.

@PsyGik
Created November 12, 2021 09:27
Show Gist options
  • Save PsyGik/5c0c9c759d7cc4ce3b2bb98c0fa09792 to your computer and use it in GitHub Desktop.
Save PsyGik/5c0c9c759d7cc4ce3b2bb98c0fa09792 to your computer and use it in GitHub Desktop.
split background with linear gradient
.responsive-diagonal {
width: 100%;
height: 50vh;
border: 1px solid #d2d2d2ff;
background: linear-gradient(
to bottom,
#f5f5f5 50%,
#d2d2d2ff calc(50% + 1px),
#ffffff calc(50% + 1px)
);
}
<div class="responsive-diagonal"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment