【问题标题】:set table head fixed and scrolling body设置表头固定和滚动体
【发布时间】:2017-09-29 06:51:07
【问题描述】:

我有 thead 固定在顶部的那个,tbody 显示带有这个 css 的垂直滚动

thead{
    display: block;
}
tbody {
    display:block;
    height:500px;
    overflow:auto;
}

但问题是thead字段宽度没有调整为tbody字段宽度 嘿,我可以让 head 和 body 字段具有相同的宽度吗?(没有 css 它具有相同的宽度)

【问题讨论】:

  • 你能把你的代码运行起来吗?sn-p
  • 把html也放进去,sn-p会更好。

标签: html css twitter-bootstrap-3


【解决方案1】:

试试 添加 .navbar-fixed-top 并包含 .container 或 .container-fluid 以居中和填充导航栏内容。

【讨论】:

    【解决方案2】:
    thead{
      display: block;
    }
    
    tbody {
     position:absolute; 
     display:block;
     height:500px;
     Width:200px;
    }
    

    试试这个...

    【讨论】:

    • 不起作用,广告宽度仍然与 tbdoy witdth 不同
    • 可以分享你的代码,因为这只是一行代码吗? .我什至无法尝试运行它
    猜你喜欢
    • 1970-01-01
    • 2019-11-30
    • 2020-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-22
    • 2017-11-09
    • 1970-01-01
    相关资源
    最近更新 更多