1

I feel the font size of the content of tooltip is small. For example, the code is as below:

<span name="explanation" data-toggle="tooltip" title="hello world!"></span>

So how to modify the font size of the showed 'hello world!' when mouse hovering the span element?

JustinGong
  • 399
  • 1
  • 4
  • 17
  • Look in the page code what element the tooltip is, maybe it has a class where xou can override the defaults. – Matthias Seifert Sep 11 '17 at 10:56
  • Possible duplicate of [How to change the style of Title attribute inside the anchor tag?](https://stackoverflow.com/questions/2011142/how-to-change-the-style-of-title-attribute-inside-the-anchor-tag) – Ofisora Sep 11 '17 at 11:46

2 Answers2

3

First, start with the following code into the HTML head section: Second, embed a tooltip somewhere on your page using respectivly the following code

 <style type="text/css">
a.tooltip {
 position: relative;
 text-decoration: none;
 color: blue;
}

a.tooltip span {
 display: none;
}

a.tooltip:hover span {
 position: absolute;
 top: 40px;
        font-size: 40px;
 left: 0px;
 display: block;
 width: 250px;
 color: black;
 background-color: #FFFF40;
 border: 1px solid black;
 padding: 5px;
}
</style>
  <a class="tooltip" href="#">this text<span>This help text is shown in the tooltip. It spans multiple lines and works in all browsers.</span></a>
Dubois
  • 114
  • 7
0

jQuery Tooltip is a good choice. the font size is larger and favorite for me.

JustinGong
  • 399
  • 1
  • 4
  • 17