Last active
August 29, 2015 13:58
-
-
Save daphotron/10037575 to your computer and use it in GitHub Desktop.
CSS hover Tooltip http://sassmeister.com/gist/10037575
This file contains hidden or 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
| <div class="link-edit" data-title="edit link"> | |
| <a href="#"> | |
| edit | |
| </a> | |
| </div> |
This file contains hidden or 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
| // ---- | |
| // 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; | |
| } |
This file contains hidden or 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
| .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; | |
| } |
This file contains hidden or 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
| <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