簡體   English   中英

彈出窗口引導程序中的文本方向從右到左 (rtl)

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

我嘗試編寫一個在懸停時出現的簡單彈出框,到目前為止非常簡單。 問題是我想用不是英文的標題寫標題實際上我想用希伯來語寫標題。 眾所周知,語言的方向是 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"


    });   


});

這是測試代碼的鏈接

刪除 שלום 周圍的 div 標簽,並在您的 css 中寫入:

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

這是你的例子

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM