gpt4 book ai didi

html - 如何将 TD 放入包含大量内容的表格中

转载 作者:行者123 更新时间:2023-11-28 07:30:01 25 4
gpt4 key购买 nike

最后一个 TD 中的内容将在单击“单击内容”时显示和隐藏。但 TD 不适合表格。如何解决这个问题。

<table>
<tr>
<td>test td 1</td>
<td>test td 2</td>
<td>test td 3</td>
<td>test td 4</td>
<td>test td 5</td>
<td>Click for content</td>
<td>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pulvinar nisi sit amet luctus efficitur. Vivamus eu risus suscipit, ultricies tortor eu, sodales tellus. Sed sed feugiat massa. Cras mollis, erat eget pellentesque porttitor, mauris lectus ultricies neque, varius iaculis quam mi et quam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc egestas nec mi eu lobortis. Nam eu scelerisque orci. Mauris vel ultricies dui, non accumsan turpis. Aliquam pulvinar in dolor sit amet fringilla. Integer sed quam pellentesque, volutpat arcu a, feugiat nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed auctor ac nulla sit amet suscipit.
</td>
</tr>
</table>

fiddle :http://jsfiddle.net/rngapLze/

最佳答案

tr td {
border: 1px solid red;
background: #eaeaea;
}
<table>
<tr>
<td class="item-big" colspan="5">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer pulvinar nisi sit amet luctus efficitur. Vivamus eu risus suscipit, ultricies tortor eu, sodales tellus. Sed sed feugiat massa. Cras mollis, erat eget pellentesque porttitor, mauris
lectus ultricies neque, varius iaculis quam mi et quam. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc egestas nec mi eu lobortis. Nam eu scelerisque orci. Mauris vel ultricies dui, non accumsan turpis. Aliquam pulvinar in dolor
sit amet fringilla. Integer sed quam pellentesque, volutpat arcu a, feugiat nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed auctor ac nulla sit amet suscipit.</td>
</tr>
<tr>
<td class="item0">test td 1</td>
<td class="item1">test td 2</td>
<td class="item2">test td 3</td>
<td class="item3">test td 4</td>
<td class="item4">test td 5</td>
</tr>
</table>

关于html - 如何将 TD 放入包含大量内容的表格中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31584414/

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