简体   繁体   English

弹出窗口引导程序中的文本方向从右到左 (rtl)

[英]text direction right to left (rtl) inside popover bootstrap

I try to code a simple popover that appears on hover, pretty easy so far.我尝试编写一个在悬停时出现的简单弹出框,到目前为止非常简单。 the problem is that I want to write the title not in English in fact I want to write the title in Hebrew.问题是我想用不是英文的标题写标题实际上我想用希伯来语写标题。 As you all know the direction of the language is rtl and not ltr.众所周知,语言的方向是 rtl 而不是 ltr。 My problem is that I cant change the direction of the text property, already tried to use class= pull-right.我的问题是我无法改变 text 属性的方向,已经尝试使用 class= pull-right。

here is the code:这是代码:

$(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"


    });   


});

here is the link to test the code这是测试代码的链接

Remove the div tag around שלום, and write in your css:删除 שלום 周围的 div 标签,并在您的 css 中写入:

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

Here is your example这是你的例子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM