Last active
July 16, 2019 23:25
-
-
Save joelburton/c623612ca9532fc18ed466644a41088d to your computer and use it in GitHub Desktop.
This file contains 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
<html> | |
<head> | |
<style> | |
#outer { position: relative; left: 0; top: 0; } | |
#scrollable { width: 10em; height: 5em; overflow: scroll; } | |
#tooltip { display: none; position: absolute; left: 150px; top: 50px; border: solid 1px black; background-color: goldenrod; padding: 0.5em } | |
</style> | |
</head> | |
<body> | |
<div id="outer"> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div>I'm just some dumb block</div> | |
<div id="scrollable"> | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
fkjdshkjfdh jkfdsh dsfkjdhf ksdhfkdsdsfdsfdsfs | |
<i id="hover-over-me">Hover Over Me!</i> | |
<div id="tooltip">I am a tooltip, yo<div> | |
</div> | |
</div> | |
</body> | |
<script> | |
document.getElementById("hover-over-me").addEventListener("mouseenter", function () { | |
document.getElementById("tooltip").style.display = "block"; | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment