3
我正在尝试使用自定义颜色和图像/文本创建按钮。添加颜色和图像/文字很容易,但现在我有垂直对齐的问题。 “文本对齐:中心”帮助我进行水平对齐,但没有垂直运气。GWT PushButton图像/文本对齐
<ui:style>
.gwt-b {
margin: 50px;
height: 23px;
width: 60px;
color: #fff;
font-size: 12px;
font-family: arial, sans-serif;
text-align: center;
vertical-align: middle;
background: -webkit-linear-gradient(top,#4d90fe,#357ae8);
border: 1px solid #3079ED;
outline-color: #3079ED;
outline-width: 3px;
}
</ui:style>
<g:HorizontalPanel>
<g:PushButton ui:field='pushButton' enabled='true' addStyleNames="{style.gwt-b}">
<g:upFace image="{res.search}">
</g:upFace>
</g:PushButton>
<g:PushButton ui:field='pushButton2' enabled='true' addStyleNames="{style.gwt-b}">
<g:upFace>
<b>click me</b>
</g:upFace>
</g:PushButton>
<g:HorizontalPanel>
这里是我已经有了:
它有助于文本的情况下,而不是图像 – Melena 2012-02-05 17:06:02