Created
March 7, 2019 19:57
-
-
Save fostergn/0458fbc5e38e376e848a0d89f3f526e9 to your computer and use it in GitHub Desktop.
Complex Hover
This file contains 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
<style> | |
.project__container { | |
transition: box-shadow .3s; | |
background-color: rgba(0, 0, 255, .8); | |
color: #fff; | |
display: inline-block; | |
padding: 10px; | |
box-shadow: 6px 11px 28px -8px rgba(0,0,0,0); | |
} | |
.project__container:hover { | |
box-shadow: 6px 11px 28px -8px rgba(0,0,0,0.77); | |
} | |
.project__container:hover .project__link { | |
opacity: 1; | |
} | |
.project__link { | |
transition: opacity .2s; | |
opacity: 0; | |
background-color: yellow; | |
color: #000; | |
padding: 5px; | |
margin: 10px; | |
} | |
.project__link:hover { | |
background-color: red; | |
} | |
</style> | |
<div class="project__container"> | |
<header class="project__header"> | |
<div class="project__title">Hey Guys</div> | |
<div class="project__description">You already know what the h*ck is going on.</div> | |
</header> | |
<a class="project__link">Click Me</a> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment