Skip to content

Instantly share code, notes, and snippets.

@mayeenulislam
Last active January 20, 2023 06:08
Show Gist options
  • Save mayeenulislam/1f6072b6991f5120da7c17f3763454ca to your computer and use it in GitHub Desktop.
Save mayeenulislam/1f6072b6991f5120da7c17f3763454ca to your computer and use it in GitHub Desktop.
CSS Tooltip and <acronym> tag
abbr {
position: relative;
cursor: pointer;
}
abbr:hover::after {
content: attr(title);
position: absolute;
white-space: nowrap;
background-color: #666;
padding: 3px 7px;
color: #fff;
border-radius: 3px;
left: 0;
top: 27px;
}
<p>
Rural development is a key thing for acheiving <abbr title="Gross Domestic Product">GDP</abbr>. Where there <abbr title="Bangladesh Agricultural and Rural Development">BARD</abbr> is an institution dedicated to this particular achievement.
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment