Skip to content

Instantly share code, notes, and snippets.

@JeremyLikness
Created October 22, 2019 15:12
Show Gist options
  • Select an option

  • Save JeremyLikness/bcd9582f45e51cafaa886ca46e06fe10 to your computer and use it in GitHub Desktop.

Select an option

Save JeremyLikness/bcd9582f45e51cafaa886ca46e06fe10 to your computer and use it in GitHub Desktop.
Vanilla.js style
body {
font-family: sans-serif, arial, helvetica;
}
button {
cursor: pointer;
margin-top: 1em;
padding: 1em;
border-radius: 50%;
}
div.post {
border-top: solid black 2px;
}
h1 {
width: 95%;
font-size: 1.5em;
background: lightgray;
padding: 0.2em;
text-align: justify;
}
p {
margin-left: 2em;
}
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: gray;
color: #fff;
text-align: center;
padding: 5px;
margin-left: -5px;
border-radius: 6px;
position: absolute;
z-index: 1;
}
.tooltiptext:hover {
visibility: visible;
}
.tooltip:hover .tooltiptext {
visibility: visible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment