对话框中的多行标题?

Jam*_*mes 6 javascript css jquery jquery-ui

如何拥有一个标题超过一行的JQuery Dialog?

见:http://jsfiddle.net/VKcJ7/7/

我尝试过使用换行符,并为标题和标题栏摆弄JQuery UI CSS类,但似乎没有任何工作.

JS:/ JQuery:

$(document).ready(function () {
    $('#dialog').dialog({
        autoOpen: false,
        modal: true,
        title: 'Something really long wow \n too much to have in a title but oh well'
        //adding the newline character \n does nothing!
    });
});
Run Code Online (Sandbox Code Playgroud)

CSS:

.ui-dialog-title{

}

.ui-dialog-titlebar{

}
Run Code Online (Sandbox Code Playgroud)

Alo*_*ain 4

具有.ui-dialog-title将溢出文本截断为...(省略号)的CSS。

white-space: nowrap;
text-overflow: ellipsis;
Run Code Online (Sandbox Code Playgroud)

使用下面的 css 应该可以解决这个问题。

white-space: normal;
Run Code Online (Sandbox Code Playgroud)

编辑:

makewhite-space: normal将忽略该text-overflow声明。