2012-02-23 58 views
0

我有一個使用gwt的web應用程序。gwt-css-background-image-text

我有這個CSS一個textare:

.progress60{ 
    font-family: Lucida Sans; 
    font-size: 13px; 
    width: 215px; 
    height: 27px; 
    background-image: url(images/60.png); 
} 

我想這裏面的文字是在垂直中間。

我該怎麼做?

回答

1

在文本上使用填充像這樣:padding-top: 7px; 7是(27 - 13)/ 2。 我不確定這是否會將填充添加到背景圖片中,但請嘗試一下!

+1

非常感謝你;) – user959456 2012-02-23 18:32:43