弹出框自举程序中的文本方向从右到左(rtl)

问题描述 投票:2回答:1

我尝试编写一个悬停时显示的简单弹出框,到目前为止非常简单。问题是我想用英语写标题,实际上我想用希伯来语写标题。众所周知,语言的方向是rtl而不是ltr。我的问题是我无法更改text属性的方向,已经尝试使用class = pull-right。

这里是代码:

$(document).ready(function(){
$('#start').popover({
    html : true, 
    content: "as you can see the hebrew text doesnt fit the title",
    title: "<div class='pull-right'>שלום</div>",
    placement : "bottom",
    trigger: "hover"


    });   


});

这里是链接to test the code

jquery html twitter-bootstrap popover
1个回答
2
投票

删除שלום周围的div标签,并在CSS中输入:

.popover-title {text-align: right;}

这里是您的example

© www.soinside.com 2019 - 2024. All rights reserved.