2010-07-12 73 views

回答

0

styled.css:

input[@type='button'] 
{ 
    background-image: url(button.png); 
} 

input[@type='reset'] 
{ 
    background-image: url(reset.png); 
} 

input[@type='file'] 
{ 
    background-image: url(file.png); 
} 
0

HTML

<input type="button" name="buttonname" class="form-button" /> 

CSS

<style type="text/css"> 

.form-button 
{ 
    background-image: url(image.gif); 
} 

</style> 
+0

我做了這樣的事情,也沒有工作: http://eximi.dreamhosters.com/Hawaii/html/contact_email.php 這裏是我的CSS: input.print { \t背景 - image:url(../ assets/images/print_btt.png); \t width:119px; \t height:47px; } input.upload { \t background-image:url(../ assets/images/uf_btt.png); \t width:119px; \t height:47px; } \t input.reset { \t background-image:url(../ assets/images/reset_btt.png); \t width:119px; \t height:47px; } – vlevsha 2010-07-13 01:17:57

+0

HTML: \t \t \t \t \t <輸入類= 「上載」 型= 「文件」 名稱= 「UploadedFile的」/> \t \t \t \t \t <輸入類= 「復位」 類型= 「復位」/> \t \t \t \t \t <輸入類= 「print」type =「button」onclick =「window.print()」/> 對不起,我是新來的,不知道如何添加表單注意代碼示例。 – vlevsha 2010-07-13 01:21:41

2

不幸的是你的文件按鈕離不開應用a hack設置樣式,但其他類型的可樣式如下:

<style type="text/css"> 
    input[type=button] { 
    background-image: url(http://static3.grsites.com/archive/textures/blue/blue003.jpg); 
    color: yellow; 
    font-weight: bold; 
    } 

    input[type=reset] { 
    background-image: url(http://static2.grsites.com/archive/textures/red/red003.jpg); 
    color: yellow; 
    font-weight: bold; 
    } 
</style> 
+0

+1:這是最完整的答案。 – NotMe 2010-07-13 00:33:18