查看this文章,我創建了一個類(t1),以便將表正確放置在移動設備上。就像這樣:在html表格中添加兩個類
/*
Label the data
*/
.t1 td:nth-of-type(1):before { content: "Name"; }
.t1 td:nth-of-type(2):before { content: "Category A"; }
.t1 td:nth-of-type(3):before { content: "Category B"; }
.t1 td:nth-of-type(4):before { content: "Category C"; }
.t2 td:nth-of-type(1):before { content: "Name"; }
.t2 td:nth-of-type(2):before { content: "Category X"; }
.t2 td:nth-of-type(3):before { content: "Category Y"; }
.t2 td:nth-of-type(4):before { content: "Category Z"; }
我也是從this網站增加了一個表分揀機分揀機也工作正常。分揀機已經有一個類(的tablesorter)
當我使用下面的表格正確定位,因爲T1類的移動
<table id="table1" class="t1" width="100%" border="1" >
當我使用下面的表越來越因爲的tablesorter類
<table id="table1" class="tablesorter" width="100%" border="1" >
現在我的問題的排序,我可以只用一個表類,所以無論是移動定位發生正常或分揀機。我希望這兩個功能。是否可以在表中使用兩個類?我閱讀了一篇文章here,但我認爲它不適用於我的問題。任何人都可以提出一種方法來實現這一點?
t2類正常工作,因爲我還沒有把它分類。
謝謝
編輯:它不是重複的,因爲我看到了多個類here寫了一些功能,所以弄糊塗了。然而,我現在得到了解決方案,並添加了一條評論:「當在移動設備上逐行查看錶格時,排序功能無法正常工作,但它仍然可以在桌面上使用!有什麼方法可以讓它在移動設備上運行? 「
身份被定義一次,類被創建多次被空格分開 – AvrilAlejandro 2014-09-23 13:30:51
非常感謝你 – 2014-09-23 13:39:55