0
是否可以從某個類獲取面板的邊框寬度和/或其他css樣式屬性值? (如果使用uibinder中的ui:style聲明瞭css樣式屬性)。如何獲得gwt中css樣式屬性的值
是否可以從某個類獲取面板的邊框寬度和/或其他css樣式屬性值? (如果使用uibinder中的ui:style聲明瞭css樣式屬性)。如何獲得gwt中css樣式屬性的值
這可能與com.google.gwt.dom.client.Style有關。 UIObject(和Widget一樣)有返回DOM Element的getElement()
方法。
嘗試getElement() - > getStyle() - > getBorderWidth()。在Style類中,有許多CSS屬性都有適當的方法。對於其他道具風格有getProperty(String)
方法(例如獲取「backgroungPosition」)。這應該也適用於ui:style。