JQuery Mobile <h1>标题被切断了吗?

Sat*_*000 4 jquery-mobile

我的jquery代码中的标题标题有问题.

基本上在标题的第3个字符后我得到...我想显示整个标题.

为什么要切断它,我该如何解决这个问题呢?

Chr*_*son 8

这里的第4点描述了一个合适的CSS解决方案

http://www.webdesignerdepot.com/2011/05/10-handy-jquery-mobile-tips-and-snippets-to-get-you-started/

对于列表项添加:

body .ui-li .ui-li-desc {
 white-space: normal;
}
Run Code Online (Sandbox Code Playgroud)

对于页脚内容添加:

body .ui-footer .ui-title {
 white-space: normal;
}
Run Code Online (Sandbox Code Playgroud)

或者看看这个解决方法

http://operationmobile.com/how-to-stop-your-jquery-mobile-header-from-being-cut/


mpo*_*llo 7

这是我使用的解决方案:

<style>
    .ui-header .ui-title {
        margin-right: 0px;
        margin-left: 0px;
    }
</style>
Run Code Online (Sandbox Code Playgroud)

请注意,这可能只有效,因为我的标题栏中没有任何其他内容,例如按钮.如果你只是使用white-space: normal;你获得行包装的文本,但仍然占用两行.(这是我试图通过使用避免的margin-*.)