<div class="content-item">
<div class="overlay"></div>
<div class="corner-overlay-content">Info</div>
<div class="overlay-content">
<h2>Image Ink Logo</h2>
<p>Logo for a screen printing company. They wanted a detachable/recognizable brand that didn't need the name of the company.</p>
</div>
</div>
@import "compass/css3";
$yellow: #e8c63d;
p {
margin: 0;
padding: 0;
}
.content-item {
background: url(https://dribbble.s3.amazonaws.com/users/21389/screenshots/537633/image_ink_logo.png);
@include backface-visibility(hidden);
height: 300px;
margin: 20px auto;
overflow: hidden;
position: relative;
width: 400px;
.overlay {
border-bottom: 100px solid $yellow;
border-left: 100px solid transparent;
bottom: 0;
height: 0;
opacity: 0.95;
position: absolute;
right: 0;
text-indent: -9999px;
@include transition(all 0.5s ease-out);
width: 0;
}
&:hover .overlay {
border-bottom: 800px solid $yellow; //size must be double container
border-left: 800px solid transparent; //size must be double container
@include transition(all 0.5s ease-out);
}
.corner-overlay-content {
bottom: 15px;
color: #333;
position: absolute;
right: 15px;
@include transition(all 0.5s ease-out);
}
&:hover .corner-overlay-content {
opacity: 0;
@include transition(all 0.5s ease-out);
}
.overlay-content {
bottom: 0;
color: #333;
left: 0;
opacity: 0;
padding: 30px;
position: absolute;
right: 0;
top: 0;
@include transition(all 0.3s ease-out);
h2 {
border-bottom: 1px solid #333;
padding: 0 0 12px;
}
}
&:hover .overlay-content {
opacity: 1;
@include transition(all 0.3s ease-out);
@include transition-delay(0.3s);
}
}
body {
display: grid;
height: 100vh;
margin: 0;
place-items: center;
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.