Html 数据加载到表头和表体后,如何将表头与表体对齐
我正在Angular 7中制作一个简单的应用程序,需要将数据从web服务加载到表中 问题在于加载此web服务后,表标题与表体不对齐: html 结果:Html 数据加载到表头和表体后,如何将表头与表体对齐,html,css,angular,bootstrap-4,Html,Css,Angular,Bootstrap 4,我正在Angular 7中制作一个简单的应用程序,需要将数据从web服务加载到表中 问题在于加载此web服务后,表标题与表体不对齐: html 结果: 以下是您答案的解决方案: .css文件中的 //remove **display:block** // if you don't want heading in center, then apply css as below .fixed_header thead, tbody { text-align: left } .fixed_he
以下是您答案的解决方案: .css文件中的
//remove **display:block**
// if you don't want heading in center, then apply css as below
.fixed_header thead, tbody { text-align: left }
.fixed_header tbody {
height: 450px; /* Just for the demo */
overflow-y: auto; /* Trigger vertical scroll */
overflow-x: hidden; /* Hide the horizontal scroll */
}
以下是您答案的解决方案: .css文件中的
//remove **display:block**
// if you don't want heading in center, then apply css as below
.fixed_header thead, tbody { text-align: left }
.fixed_header tbody {
height: 450px; /* Just for the demo */
overflow-y: auto; /* Trigger vertical scroll */
overflow-x: hidden; /* Hide the horizontal scroll */
}
您好,是的,这解决了问题,但现在我的标题不是静态的;标题在某种意义上不是静态的?你能解释一下吗?嗨,是的,这解决了问题,但现在我的头不是静态的;标题在某种意义上不是静态的?你能解释一下吗?
//remove **display:block**
// if you don't want heading in center, then apply css as below
.fixed_header thead, tbody { text-align: left }
.fixed_header tbody {
height: 450px; /* Just for the demo */
overflow-y: auto; /* Trigger vertical scroll */
overflow-x: hidden; /* Hide the horizontal scroll */
}