<p>您可以在表格的样式中添加固定高度的属性,例如:</p>
<style>
#goods-table{
  height: 500px; /* 固定高度 */
  font-size: 24px;
  line-height: 40px;
}
#goods-table tbody tr{
  height: 40px; /* 固定行高 */
}
</style>
<p>这样即使数据不够,表格的高度和行高也会保持不变,不会自动放大列来铺满屏幕。</p>
div					!-- 商品列表内容 --					table id=goods-table class=layui-table style=height 500px; font-size 24px; line-height 40px;					 colgroup						col width=80						col width=800						col width=800						col

原文地址: https://www.cveoy.top/t/topic/bdvs 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录