gpt4 book ai didi

javascript - Tablesaw 标题未在移动设备上显示

转载 作者:太空狗 更新时间:2023-10-29 15:12:56 25 4
gpt4 key购买 nike

根据他们的示例和文档,您应该能够在手机上看到 header :

tablesaw doc

table-saw demo

enter image description here

然而,当我尝试使用下表时:

<table id="table-client" class="table table-responsive tablesaw tablesaw-stack" data-tablesaw-mode="stack"

我明白了:

enter image description here

如您所见,没有标题。

我四处搜索,在 github 上看到一个人遇到了同样的问题,但他没有解决这个问题。

我想问你们,有没有人遇到过这个问题并且知道解决它的方法?

最佳答案

如果没有看到您的 html 表格的结构,就不可能说出标题没有显示的原因。但这是来自演示站点的代码,所以只要匹配他们在这里所做的,它就应该可以工作。

确保您包含了他们库的 CSS。看起来你可能不是,这可能是问题所在。

他们使用的 jQuery (v3.1.1) 版本高于我选择的版本 (v2.1.1),但这似乎无关紧要。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://filamentgroup.github.io/tablesaw/dist/tablesaw.js"></script>
<script src="https://filamentgroup.github.io/tablesaw/dist/tablesaw-init.js"></script>
<link rel="stylesheet" href="http://filamentgroup.github.io/tablesaw/dist/tablesaw.css">


<table class="tablesaw tablesaw-stack" data-tablesaw-mode="stack" id="tablesaw-5335">
<thead>
<tr>
<th scope="col" data-tablesaw-priority="persist">Movie Title</th>
<th scope="col" data-tablesaw-sortable-default-col="" data-tablesaw-priority="3">Rank</th>
<th scope="col" data-tablesaw-priority="2">Year</th>
<th scope="col" data-tablesaw-priority="1"><abbr title="Rotten Tomato Rating">Rating</abbr></th>
<th scope="col" data-tablesaw-priority="4">Gross</th>
</tr>
</thead>
<tbody>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Avatar_(2009_film)">Avatar</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">1</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2009</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">83%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$2.7B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Titanic_(1997_film)">Titanic</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">2</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">1997</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">88%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$2.1B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/The_Avengers_(2012_film)">The Avengers</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">3</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2012</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">92%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.5B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Harry_Potter_and_the_Deathly_Hallows_%E2%80%93_Part_2">Harry Potter and the Deathly Hallows—Part 2</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">4</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2011</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">96%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.3B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Frozen_(2013_film)">Frozen</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">5</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2013</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">89%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.2B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Iron_Man_3">Iron Man 3</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">6</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2013</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">78%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.2B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Transformers:_Dark_of_the_Moon">Transformers: Dark of the Moon</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">7</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2011</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">36%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.1B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/The_Lord_of_the_Rings:_The_Return_of_the_King">The Lord of the Rings: The Return of the King</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">8</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2003</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">95%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.1B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Skyfall">Skyfall</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">9</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2012</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">92%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.1B</span></td>
</tr>
<tr>
<td class="title"><b class=" tablesaw-cell-label">Movie Title</b><span class="tablesaw-cell-content"><a href="http://en.wikipedia.org/wiki/Transformers:_Age_of_Extinction">Transformers: Age of Extinction</a></span></td>
<td><b class=" tablesaw-cell-label">Rank</b><span class="tablesaw-cell-content">10</span></td>
<td><b class=" tablesaw-cell-label">Year</b><span class="tablesaw-cell-content">2014</span></td>
<td><b class=" tablesaw-cell-label"><abbr title="Rotten Tomato Rating">Rating</abbr></b><span class="tablesaw-cell-content">18%</span></td>
<td><b class=" tablesaw-cell-label">Gross</b><span class="tablesaw-cell-content">$1.0B</span></td>
</tr>
</tbody>
</table>

关于javascript - Tablesaw 标题未在移动设备上显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42906505/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com