Skip to content

Instantly share code, notes, and snippets.

@yankeyhotel
Last active August 29, 2015 14:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yankeyhotel/4ee81a6e99db65804d19 to your computer and use it in GitHub Desktop.
Save yankeyhotel/4ee81a6e99db65804d19 to your computer and use it in GitHub Desktop.
Triangle Mask LESS
.hero-mask(@trianlgle-height: 40px) {
height: (@trianlgle-height / 2);
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 1000;
&:before,
&:after {
border-bottom: (@trianlgle-height / 2) solid #fafafa;
content: ' ';
display: block;
position: absolute;
top: 0;
height: 0;
width: 50%;
}
&:before {
border-left: 0;
border-right: @trianlgle-height solid transparent;
left: 0;
}
&:after {
border-right: 0;
border-left: @trianlgle-height solid transparent;
right: 0;
}
}// .hero-mask
<div class="hero">
<div class="content">Content Goes Here</div>
<div class="hero-mask"></div>
</div>
.hero {
.background-cover('../img/img.jpg', center); // https://gist.github.com/yankeyhotel/a96e5ef7bb83af8bb670
position: relative;
width: 100%;
.hero-mask {
.hero-mask();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment