开发者

ExtJS override css properties

开发者 https://www.devze.com 2023-04-10 16:01 出处:网络
I am using ExtJS textarea and trying to remove the border and background image for the textarea. I am able to remove the border for the textarea, but unable to remove the default background-image.

I am using ExtJS textarea and trying to remove the border and background image for the textarea. I am able to remove the border for the textarea, but unable to remove the default background-image.

The component in fact is not taking the background I have set in fieldStyle. When I inspect the element in firebug after the textarea is rendered, I don't see the background in the style.

var textArea=Ext.create('Ext.f开发者_运维知识库orm.field.TextArea', {
       width:200,
       fieldStyle:'border:none;background:#FFF !important;width:120px;'
}

How do I override the background and width only for the field?

Thanks


Remember that, besides adding the "!important" directive, your stylesheet must be the last one to be loaded, the "cascading concept", so your rule would be the one to be read.

after the CSS rules loaded for extjs, yours must come after.

Hope this helps.


change to background-color:#FFF !important.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号