猿问

如何在 Semantic-UI 中添加换行符 whitin 弹出数据工具提示

我想要总共 3 句话,在数据工具提示中使用添加换行符我已经尝试过但它不起作用


    <div class="ui icon button" data-html="true"

    data-tooltip="The default theme's basic popup <br/> 

removes the pointing arrow." 

    data-position="bottom center">

      <i class="add icon"></i>

    </div>


梵蒂冈之花
浏览 189回答 1
1回答

大话西游666

你可以使用这个:<div class="ui icon button" data-html="<div class='content'>The default theme's basic&nbsp;popup <br/> removes the pointing arrow.</div></div>" data-position="bottom center">&nbsp; &nbsp;<i class="add icon"></i></div>或者这个,在这种格式中,您可以使用您需要的每个 html 标签:<div class="ui icon button test">&nbsp; &nbsp; <i class="add icon"></i></div><div class="ui custom popup top left transition hidden">&nbsp; &nbsp; The default theme's basic popup&nbsp;&nbsp; &nbsp; <br/>&nbsp; &nbsp; removes the pointing arrow.</div>并使用此脚本:<script>&nbsp; &nbsp; $(".test.button").popup({&nbsp; &nbsp; &nbsp; &nbsp;popup : $(".custom.popup"),&nbsp; &nbsp; &nbsp; &nbsp;on&nbsp; &nbsp; : 'hover'&nbsp; &nbsp; });</script>
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答