禁止截断过长的列表和按钮内容

在jQuery mobile中,如果列表或者按钮中文字的内容过长,jQuery Mobile会自动截断其超过长度的内容,但如果不希望这样的话,可以在CSS样式中增加如下设置即可,比如下面的是针对按钮的CSS样式设置:

1 .ui-btn-text {
2     white-space: normal;
3 }

 

    .ui-btn-text {
    white-space: normal;
    } 

下面的是针对列表的CSS样式设置

.ui-li-desc {
    white-space: normal;
}

 

如果要恢复对文字的截断,则继续设置CSS为white-space: nowrap;

 
posted @ 2013-01-15 00:18  HansenLou  阅读(116)  评论(0)    收藏  举报