Skip to content

Instantly share code, notes, and snippets.

@behnamazimi
Last active February 27, 2020 19:32
Show Gist options
  • Save behnamazimi/99456340dd0f14dc80ac25cb72b12ed2 to your computer and use it in GitHub Desktop.
Save behnamazimi/99456340dd0f14dc80ac25cb72b12ed2 to your computer and use it in GitHub Desktop.
<div class="box">Simple Box</div>
<style>
.box {
color: #fff;
height: 250px;
margin: 2rem;
position: relative;
padding: 1rem;
background: #000;
background: linear-gradient(to right, #000000, #e30808);
}
.box::before {
content: '';
width: 100%;
height: 100%;
opacity: .75;
position: absolute;
top: 10px;
left: 10px;
z-index: -1;
// inheritted from .box class
// and add blur filter
background: inherit;
filter: blur(10px);
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment