Skip to content

Instantly share code, notes, and snippets.

@papandreou
Last active May 17, 2018 20:44
Show Gist options
  • Save papandreou/41dd7aa9497dc7c29f14b0537e222851 to your computer and use it in GitHub Desktop.
Save papandreou/41dd7aa9497dc7c29f14b0537e222851 to your computer and use it in GitHub Desktop.
For Netta: Background images appearing on hover
/**
* For Netta: Background images appearing on hover
*/
ul {
list-style: none;
padding: 0;
}
li:hover::after {
z-index: -1;
content: '';
position: absolute;
background-position: 50% 50%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-repeat: no-repeat;
}
li:nth-child(1)::after {
background-image: url(https://picsum.photos/400/300);
}
li:nth-child(2)::after {
background-image: url(https://picsum.photos/500/400);
}
<ul>
<li><a href="#">First link</a></li>
<li><a href="#">Second link</a></li>
</ul>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment