Skip to content

Instantly share code, notes, and snippets.

@nemzes
Created July 5, 2018 09:57
Show Gist options
  • Save nemzes/4651f10251c480f3a42f0f700598abda to your computer and use it in GitHub Desktop.
Save nemzes/4651f10251c480f3a42f0f700598abda to your computer and use it in GitHub Desktop.
Untitled
.thing {
padding: 1rem;
border: 1px solid rebeccapurple;
position: relative;
width: 10rem;
}
.thing__link2 {
position: absolute;
right: 1rem;
background: #fff;
padding-left: 1rem;
opacity: 0;
transition: opacity .2s;
}
.thing__link2:focus,
.thing__link2:hover,
.thing__link1:hover + .thing__link2 {
opacity: 1;
}
<div class="thing">
<a class="thing__link1" href="#">Link 1 is a bit long</a>
<a class="thing__link2" href="#">Link 2 is smaller</a>
</div>
// alert('Hello world!');
{"view":"separate","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