我正在使用 dgrid 的 onDemandGrid 并希望居中对齐特定的列标题,但不是网格中的所有标题。我将如何着手完成这项工作?
我的 css 文件中有以下内容:
.mywidget h3 {
font-size: 1.2em;
}
.mywidget h3, p {
margin-top: 0;
}
.dgrid {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: auto;
font-size:larger;
}
.dgrid-row-odd {
background: #F2F5F9;
}
.dgrid-column-A{
width: 80px;
}
.dgrid-column-B{
width: 120px;
}
.dgrid-column-C {
width: 80px;
}
.dgrid-column-D {
width: 120px;
}
.dgrid-column-E {
width: 50px;
}
.dgrid-column-F {
width: 70px;
}
最佳答案
这对我有用
.dgrid-header .dgrid-column-B {
width: 120px;
text-align:center;
}
关于javascript - 如何居中对齐 onDemandGrid 标题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43193027/