简体   繁体   English

Ext Js 4“空白”仅适用于项目中的一个网格

[英]Ext Js 4 “white-space” only for one grid in project

Dear StackOverFlowers ) 亲爱的StackOverFlowers)

I am trying to style only one grid in my ExtJs 4 project. 我试图在我的ExtJs 4项目中仅设置一个网格的样式。 I want it to be "multiline" ie 我希望它是“多行”,即

    .x-grid-row .x-grid-cell-inner {
    white-space: normal;
}
.x-grid-row-over .x-grid-cell-inner {
    font-weight: bold;
    white-space: normal;
}

But if I modify css like above, all my grids became multiline. 但是,如果我像上面那样修改css,我所有的网格都变成了多行。 And in general how can I style only one component in project? 通常,如何在项目中仅对一个组件进行样式设置? For example if I want color only one tab in tabpanel (first or second) or color one of accordion titles? 例如,如果我只想给TabPanel中的一个标签上色(第一或第二个),或者给一个手风琴标题上色?

If anyone can help me I will be really appreciate ^.^ 如果有人可以帮助我,我将非常感激^。^

You can try adding an Id to the control and use it as a selector to filter out unwanted components. 您可以尝试将ID添加到控件中,并将其用作选择器以过滤掉不需要的组件。
Lets say your grid id is gridx use 假设您的网格ID为gridx使用

#gridx .x-grid-row .x-grid-cell-inner {
    white-space: normal;
}
#gridx .x-grid-row-over .x-grid-cell-inner {
    font-weight: bold;
    white-space: normal;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM