1

我正在使用 jQuery css 和 jQuery,如下所示:

<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>

我正在使用这样的对话框:

<div id="dialog-confirm-share" title="Genalytics" style="display:none;">
  <p><span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>File you selected has been already shared with that user.</p>
</div>

单词在对话框中被拆分,如下所示:

File you selected has been already sha
red with that user.

我不希望这个词分裂?我怎样才能解决这个问题?

4

1 回答 1

0

您还可以按照自己的方式自定义对话框,DEMO http://jsfiddle.net/yeyene/GnpQ8/6/

$(document).ready(function(){
    $("#dialog-confirm-share").dialog({
        width: 250,
        height: 120,       
        modal: true,
        resizable: false
    });
}); 

并添加这些 css,

#dialog-confirm-share p{
    word-break:keep-all;
    word-wrap:normal;
    white-space:normal;
} 
于 2013-07-05T06:14:01.907 回答