2012-09-13 37 views
1

我如何更改我的GWT默認列表框的樣式。 以我應用程序中的每個列表框都會改變的方式。如何更改我的GWT列表框樣式

不應該工作嗎?

.gwt-ListBox{ 
color: red !important; 

}

感謝。

+0

用於此............... body .gw-ListBox {color:red!important} –

回答

0

.............................................. ....

嗨,現在這樣做了寫

body .gwt-ListBox{ 
color: green !important; 

} 


.gwt-ListBox{ 
color: red !important; 

} 

Demo


二是

定義您body id

像這樣

HTML

<body id="someid"> 
<div class="gwt-ListBox"> 
some text 
</div> 

</body> 

的CSS

#someid .gwt-ListBox{ 
color:green !important; 
} 
+0

只有一個body元素,爲什麼要爲它添加一個id?根本沒有必要使用 - 您可以直接設計