简体   繁体   English

点击滚动更多数据

[英]Scroll more data on click

I have an appointment table in html as follows: 我在html中有一个约会表,如下所示:

 <table> <thead style="text-align:center; color:#000;"> <th style="text-align:center;">Mon</th> <th style="text-align:center;">Tue</th> <th style="text-align:center;">Wed</th> <th style="text-align:center;">Thu</th> <th style="text-align:center;">Fri</th> <th style="text-align:center;">Sat</th> </thead> <tbody style="background:#ccc"> <tr> <td style="padding:10px"> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> <li style="background:#eee; color:#000; border:solid 1px #ffb600; width:60px; padding:1px; list-style:none;">8.30</li> </td> <tr> </tbody> </table> 

I have tried to add scroll but in an indirect way, on bottom of last <li> tag a show more button should be there. 我试图添加滚动,但是以间接方式,在最后一个<li>标记的底部应该有一个show more按钮。 so that when i click on, td cell data should scroll up and rest of the data should show 这样,当我单击时,TD单元格数据应向上滚动,其余数据应显示

输出量

Please guide if someone worked on this before? 请指导以前是否有人为此工作?

There is another option called lazy loading, this feature is support in chrome browser, all we have to do is add a attribute to the html element . 还有另一个称为延迟加载的选项,Chrome浏览器支持此功能,我们要做的就是向html元素添加一个属性。

<table loading="lazy"></table>

to read more check this link lazy load 要了解更多信息,请检查此链接延迟加载

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM