Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
GWT 教程 - StockWatcher。
我正在覆盖 StockWatcher.css:
body { padding: 10px; }
但至少在左侧没有应用填充,并且整个框架与左侧齐平。
GWT 中的某些面板使用绝对定位。对作为这些面板的直接子级的小部件应用填充将不起作用。在这种情况下,您使用,例如,
myLayoutPanel.setWidgetLeftRight(myWidget, 10, Unit.PX, 10, Unit.PX);
您可以将填充和边距应用于其父级不对其子级使用绝对定位的任何小部件(例如 FlowPanel 或 HTMLPanel 内的小部件)。