Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
95 views
in Technique[技术] by (71.8m points)

Repeater friendly vertical HTML table

I need a table with vertical columns. One way to do it is like this:

<table>
  <tr>
    <th>HEADER 1</th>
    <td>X</td>
    <td>Y</td>
    <td>Z</td>
  </tr>
  <tr>
    <th>HEADER 2</th>
    <td>X</td>
    <td>Y</td>
    <td>Z</td>
  </tr>
  <tr>
    <th>HEADER 3</th>
    <td>X</td>
    <td>Y</td>
    <td>Z</td>
  </tr>
</table>

However this is not entirely possible when you get the data dynamically from your back-end and use some kind of repeater to display it in the table.

I have made an attempt based on this answer but I wasn't successful.

<table>
  <thead>
    <tr><th colspan="1">HEADER 1</th></tr>
    <tr><th colspan="1">HEADER 2</th></tr>
    <tr><th colspan="1">HEADER 3</th></tr>
  </thead>
  <tbody>
    <tr><td>x</td></tr>
    <tr><td>y</td></tr>
    <tr><td>z</td></tr>

    <tr><td>x</td></tr>
    <tr><td>y</td></tr>
    <tr><td>z</td></tr>
  </tbody>
</table>
question from:https://stackoverflow.com/questions/65922210/repeater-friendly-vertical-html-table

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...