[英]GWT - First Steps - Div+label+css style
我開始用GWT制作應用程序。 現在,我使用AbsolutePanel小部件來描述“ div”。 之后,我創建一個標簽(應該是一個跨度?),將其添加到此面板中,然后將一個CSS類應用於div。
這是代碼:
public void onModuleLoad() {
AbsolutePanel contenitore = new AbsolutePanel();
final Label label = new Label("Hello, GWT!!!");
contenitore.setStyleName("contenitore");
contenitore.add(label);
}
// css
body {background:#999999;}
.contenitore{ background-color:#333333; width:980px; margin-left:auto; margin-right:auto; overflow:auto;}
不幸的是,它沒有得到div的css屬性,我看不到標簽。 為什么? 並且,有什么變化要查看(即在netbeans上使用gwt調試),這是生成的html代碼嗎? 干杯
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.