[英]java gwt draw horizontal line
How can I draw a horizontal line in java gwt, something similar to the '< hr >' tag in HTML? 如何在java gwt中绘制一条水平线,类似于HTML中的“<hr>”标签? I tried it by using
我试过用它
com.google.gwt.user.client.Element bottomLine = DOM.createDiv();
but that somehow doesn't work in IE... 但这在某种程度上不适用于IE ...
You can use the HTML widget to add whatever html you want inside your page 您可以使用HTML小部件在页面中添加所需的html
HTML html = new HTML("<hr style=\"width:100%;\" />")
rootPanel.add(html); // or add it inside another widget
Or you can use css on Panel and define the border-bottom property (if you have a panel that spans the entire page). 或者您可以在Panel上使用css并定义border-bottom属性(如果您有一个跨越整个页面的面板)。
Document.get()
. Document.get()
。 createHRElement()
? createHRElement()
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.