Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frontend-coder/f3a8043b6f1edf73dfd792ede8baa7eb to your computer and use it in GitHub Desktop.
Save frontend-coder/f3a8043b6f1edf73dfd792ede8baa7eb to your computer and use it in GitHub Desktop.
Простой эффект, при наведении курсора на фото она затеняется #hovercss
HTML
<div class="portfolio">
<img src="img/Athena.jpg" alt="">
</div>
CSS
.portfolio{
margin: 0;
padding: 0;
position: relative;
}
.portfolio::after
{
content: " " ;
width: 100%;
height:100%;
position: absolute;
display: block;
top: 0;
left: 0;
background: #000;
opacity:0;
-moz-transition: all .5s ease-in-out;
transition: all .5s ease-in-out;
}
.portfolio:hover::after {
opacity:.55;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment