2013-03-31 41 views
1

我有這個頁面中jquerymobile在.NET MVC4如何阻止jquerymobile截斷標籤中的文本?

<div data-role="header" data-theme="b" data-position="fixed"> 
    <h3 style="color:white;"> 
      Name 
    </h3> 
<a href="#" data_icon="back"> Back </a> 

    <div data-role="fieldcontain" class="test_row"> 
     <fieldset data-role="controlgroup" data-type="horizontal" class="test_row"> 
      <input id="radio3" name="testType" value="2" type="radio" checked="checked" class="test_type"> 
      <label for="radio3" class="test_type">All tests</label> 
      <input id="radio1" name="testType" value="0" type="radio" class="test_type"> 
      <label id="test_type_label" for="radio1" class="test_type" >Automated</label>  
      <input id="radio2" name="testType" value="1" type="radio" class="test_type"> 
      <label for="radio2" class="test_type">Manual</label> 
     </fieldset> 
    </div> 
</div> 

CSS

.test_row .ui-btn { 
    text-align: center; 
} 
.ui-field-contain .ui-controlgroup-controls { 
    width: 100%; 
} 
.ui-controlgroup-controls .ui-radio { 
    width: 33.3%; 
} 

http://jsfiddle.net/ruds5/jsfiddle

當調整結果,中間運行單詞(自動)被截斷成最短的'...'。

是否可以防止在單詞結尾處截斷?

+0

請在這裏發佈的代碼,而不只是在小提琴。 –

回答

5

根據更新的問題,這裏是解決方案。文本樣式包含與類.ui-btn-inner,按鈕文本樣式如下所示。

span.ui-btn-inner { 
white-space: nowrap !important; 
overflow: visible !important; 
} 

Demo JSfiddle

+0

我遇到過類似的解決方案,但它在我之前發佈的jsfiddle中沒有效果。 – ThePavolC

+0

@PavolCeluch感謝您的更新,我會盡快爲您解答。 – Omar

1

奧馬爾與之前的版本jQuery Mobile的是正確的。但版本1.4.1沒有更多的跨度,使用:

.ui-btn-inline { 
    white-space: nowrap !important; 
    overflow: visible !important; 
}