2013-10-25 45 views
0

我正面臨着jquery-mobile表的問題(使用data-role =「table」)。 我的桌子總是迴流(即使是全高清屏幕),這裏是鏈接 to the demo pagejquery mobile,table always reflowing

我試過用jquery-mobile 1.3和1.4b,但結果仍然是一樣的。

文檔類型聲明和有效的HTML5(除了編碼)...

回答

0

這是因爲,在默認情況下(=指定沒有模式),一個表將在reflow模式。

要切換到columnToggle模式,只需添加data-mode="columntoggle"到表標籤,在指定的docs

+1

實際上,如果表格標籤具有「響應式」類別,它確實有效。謝謝 – Arch

0

您必須添加類=「UI響應」,也將努力爲的文檔建議1.4如果你想使整個表不走回流然後只補充一點:

@media (max-width: 35em) { 
    .ui-table-reflow.ui-responsive td, 
    .ui-table-reflow.ui-responsive th { 
     width: auto; 
     float: none; 
     clear: none; 
     display: table-cell; 
     margin: 0; 
     padding:0; 
    } 

} 

上面的代碼將覆蓋寬度相同的jQuery Mobile的結構和迴流停止。