Bootstrap popover隐藏换行符 [英] Bootstrap popover hides line breaks
本文介绍了Bootstrap popover隐藏换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用如下的html代码来显示bootstrap弹出窗口
I am using the html code as follows to show the bootstrap popover
<a data-original-title="" data-content="Hi,
Welcome !
Sincerely,
programmer
"
data-placement="bottom">
content
</a>
我初始化popover如下
And I initialized the popover as follows
$(this).popover({
html:true
});
所有工作正常,但问题是数据内容中可用的内容不能用空格显示.. ..它删除所有的新行,并显示在单行....我怎样才能克服这.... ....
All works fine but the problem is the content available in data-content not displayed with the spaces....It removes all the new lines and show it in the single line ....How can i overcome this....
推荐答案
您需要在html中为新行使用< br />
或使用< pre>
标记
You need to use <br />
for new line in html or use a <pre>
tag
这篇关于Bootstrap popover隐藏换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文