【发布时间】:2018-08-25 18:42:23
【问题描述】:
我正在使用媒体查询来隐藏表格中的某些列。它显示了正确的列,但所有使用 hideMobile 类的列都堆叠在一个列中。
我的 CSS:
.hideMobile {
display:block;
}
.hideDesktop {
display:none;
}
.hideMobile {
display:none;
}
.hideDesktop {
display:block;
}
以及表格的代码:
<table class="table table-hover" border="0" width="100%">
<tr>
<th>#</th>
<th></th>
<th>Team</th>
<th>G</th>
<th class="hideMobile">W</th>
<th class="hideMobile">G</th>
<th class="hideMobile">V</th>
<th class="hideMobile">+</th>
<th class="hideMobile">-</th>
<th class="hideMobile">-P</th>
<th class="hideDesktop">+/-</th>
<th>P</th>
</tr>
echo '<tr>';
echo '<td>' . $programma_output[$i]["positie"] . '</td>';
echo '<td>' . $programma_output[$i]["logo"] . '</td>';
echo '<td>' . $programma_output[$i]["teamnaam"] . '</td>';
echo '<td>' . $programma_output[$i]["gespeeldewedstrijden"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["gewonnen"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["gelijk"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["verloren"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["doelpuntenvoor"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["doelpuntentegen"] . '</td>';
echo '<td class="hideMobile">' . $programma_output[$i]["verliespunten"] . '</td>';
echo '<td class="hideDesktop">' . $programma_output[$i]["doelsaldo"] . '</td>';
echo '<td>' . $programma_output[$i]["punten"] . '</td>';
echo '</tr>';
echo '</table>';
谁能看到我哪里出错了?
【问题讨论】:
标签: php css media-queries