我最近尝试使用一个新的工具提示插件,因为我喜欢这个功能。但是我遇到了一个问题,我不知道如何添加新行,所以我的工具提示不只是贯穿整个页面。我尝试了一些我在此处阅读的解决方案,例如转义字符,但它们不起作用。
$(document).ready(function () {
$('.tooltip-custom').tooltipster({
theme: 'tooltipster-noir'
});
});
<link href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/css/tooltipster.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/css/themes/tooltipster-noir.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tooltipster/3.0.5/js/jquery.tooltipster.js"></script>
<a href="#" class="tooltip-custom" title="This is my very long run on tooltip that just doesnt seem to want to end or split lines. Ok maybe I am overreacting but still. I want to be able to start a new line whenever I please!"><h1>Hello!</h1></a>