1
Ich möchte in Bootstrap reaktionsfähige Tabelle verwenden, aber es ist etwas falsch mit meinem Code, dass es wahrscheinlich nicht funktioniert.Responsive Table Bootstrap Spalten ausblenden
Hier ist mein Code:
table {
width: 100%;
border-collapse: collapse;
}
/* Zebra striping */
tr:nth-of-type(odd) {
background: #eee;
}
th {
background: #333;
color: white;
font-weight: bold;
}
td, th {
padding: 6px;
border: 1px solid #ccc;
text-align: left;
}
@media
only screen and (max-width: 760px),
(min-device-width: 768px) and (max-device-width: 1024px) {
\t /* Force table to not be like tables anymore */
\t table, thead, tbody, th, td, tr {
\t \t display: block;
\t }
\t
\t /* Hide table headers (but not display: none;, for accessibility) */
\t thead tr {
\t \t position: absolute;
\t \t top: -9999px;
\t \t left: -9999px;
\t }
\t
\t tr { border: 1px solid #ccc; }
\t
\t td {
\t \t /* Behave like a "row" */
\t \t border: none;
\t \t border-bottom: 1px solid #eee;
\t \t position: relative;
\t \t padding-left: 50%;
\t }
\t
\t td:before {
\t \t /* Now like a table header */
\t \t position: absolute;
\t \t /* Top/left values mimic padding */
\t \t top: 6px;
\t \t left: 6px;
\t \t width: 45%;
\t \t padding-right: 10px;
\t \t white-space: nowrap;
\t }
<table class="table table-responsive">
<thead>
<tr>
<th>X Title</th>
<th>Y Title</th>
<th>Z Title</th>
</tr>
</thead>
<tbody>
<tr>
<td> XXX </td>
<td> YYY </td>
<td> ZZZ </td>
</tr> \t
</tbody>
</table>
Es gibt etwas, das ich weiß nicht, wie es aus wie dieses folgende Bild arbeiten, um nur in Mobile oder kleinen Bildschirmgrößen:
**
In der mobilen Ansicht möchte ich X TITLE entfernen, wie es geht?
**
Vielen Dank im Voraus
warum Sie codepen Links tun müssen, hier verwenden, wenn Sie den Code-Schnipsel Werkzeug gut haben mit in der SO-Kommentar-Symbolleiste. [<>] – Sreekanth
Ich bin sehr neu in diesem Stackoverflow. Ich habe auch Code-Snippet hinzugefügt. – sree
Ich verstehe, du bist neu @sree :-) bitte erkläre deine Antwort und du bekommst meine Stimme ;-) –