我正在使用 Kendo Grid,我想将字体设置为白色。
当我将此 css 代码设置为 Layout 时,它会影响所有网格。但我想要的只是将白色设置为具有 id 的网格,如 #grid id no all them。
.k-grid-header th.k-header>.k-link {
display: block;
min-height: 18px;
line-height: 18px;
margin: -0.5em -0.6em -0.4em -0.6em;
padding: .5em .6em .4em .6em;
overflow: hidden;
text-overflow: ellipsis;
**color: white;**
}
如何为特定 ID 设置类?
最佳答案
在 HTML 中你有 st.喜欢<div id="yourid" class="k-grid-header">
在 CSS 中:
#yourid.k-grid-header th.k-header > .k-link {...}
或者,如果 ID 在 .k-grid-header
的父级上:
<div id="yourid">
<div class="k-grid-header">
...
<style>
#yourid .k-grid-header th.k-header > .k-link {...}
</style>
关于css - (CSS) 为类设置 Id 如何使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28804678/