Last active
August 29, 2015 14:09
-
-
Save yankeyhotel/4ee81a6e99db65804d19 to your computer and use it in GitHub Desktop.
Triangle Mask LESS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="hero"> | |
<div class="content">Content Goes Here</div> | |
<div class="hero-mask"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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