2015-03-21 02:30:22 +03:00
|
|
|
---
|
|
|
|
layout: page
|
|
|
|
title: Tooltips
|
|
|
|
---
|
|
|
|
|
|
|
|
Add tooltips built entirely in CSS to nearly any element. Just add a few classes and an `aria-label` attribute.
|
|
|
|
|
2015-03-24 20:45:04 +03:00
|
|
|
In addition, you'll want to specify a direction:
|
2015-03-21 02:30:22 +03:00
|
|
|
|
|
|
|
- `.tooltipped-n`
|
|
|
|
- `.tooltipped-ne`
|
|
|
|
- `.tooltipped-e`
|
|
|
|
- `.tooltipped-se`
|
|
|
|
- `.tooltipped-s`
|
|
|
|
- `.tooltipped-sw`
|
|
|
|
- `.tooltipped-w`
|
|
|
|
- `.tooltipped-nw`
|
|
|
|
|
2016-02-02 05:10:50 +03:00
|
|
|
Tooltip classes will conflict with Octicon classes, and as such, must go on a parent element instead of the icon.
|
2015-03-21 02:30:22 +03:00
|
|
|
|
|
|
|
{% example html %}
|
|
|
|
<span class="tooltipped tooltipped-n" aria-label="This is the tooltip.">
|
|
|
|
Text with a tooltip
|
|
|
|
</span>
|
|
|
|
{% endexample %}
|