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?
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?
Share Improve this question asked Sep 11, 2017 at 10:49 JustinGongJustinGong 4391 gold badge6 silver badges18 bronze badges 2- Look in the page code what element the tooltip is, maybe it has a class where xou can override the defaults. – Matthias Seifert Commented Sep 11, 2017 at 10:56
- Possible duplicate of How to change the style of Title attribute inside the anchor tag? – Ofisora Commented Sep 11, 2017 at 11:46
2 Answers
Reset to default 4First, 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>
jQuery Tooltip
is a good choice. the font size is larger and favorite for me.