Skip to content

Instantly share code, notes, and snippets.

@daphotron
Last active August 29, 2015 13:58
Show Gist options
  • Select an option

  • Save daphotron/10037575 to your computer and use it in GitHub Desktop.

Select an option

Save daphotron/10037575 to your computer and use it in GitHub Desktop.
<div class="link-edit" data-title="edit link">
<a href="#">
edit
</a>
</div>
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
//http://netdna.webdesignerdepot.com/uploads7/how-to-create-a-simple-css3-tooltip/tooltip_demo.html
.link-edit {
display: inline-block;
margin: 5em;
position: relative;
}
.link-edit:hover:after {
background: #333;
background: rgba(0,0,0,.8);
bottom: 1.4em;
color: #fff;
content: attr(data-title);
left: 0;
margin-left: -2.1em;
padding: 0.3em 1em 0.4em;
position: absolute;
min-width: 4em;
text-align: center;
z-index: 98;
}
.link-edit:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 0.5em 0.5em 0 0.5em;
bottom: 1em;
content: "";
left: 0.2em;
position: absolute;
z-index: 99;
}
.link-edit {
display: inline-block;
margin: 5em;
position: relative;
}
.link-edit:hover:after {
background: #333;
background: rgba(0, 0, 0, 0.8);
bottom: 1.4em;
color: #fff;
content: attr(data-title);
left: 0;
margin-left: -2.1em;
padding: 0.3em 1em 0.4em;
position: absolute;
min-width: 4em;
text-align: center;
z-index: 98;
}
.link-edit:hover:before {
border: solid;
border-color: #333 transparent;
border-width: 0.5em 0.5em 0 0.5em;
bottom: 1em;
content: "";
left: 0.2em;
position: absolute;
z-index: 99;
}
<div class="link-edit" data-title="edit link">
<a href="#">
edit
</a>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment