我試圖改變HTML表單,輸入類型文件。這裏是我的代碼:我們可以更改<input type =「file」>樣式嗎?
HTML,形式ID =形式
<input class="upload_file" type="file" id="file" name="file" />
.CSS
I tried both:
.upload_button{
background: url('../images/upload_btn_bg.png') no-repeat;
width: 200px;
height: 40px;
}
#form input[type=file]{
background: url('../images/upload_btn_bg.png') no-repeat;
width: 200px;
height: 40px;
}
無兩的這些方法的工作原理。我確實從一些網站上看到,如臉譜,YouTube,谷歌或Twitter,他們有不同的風格。不知道他們是如何做到的。
啊......我應該早點在這裏問這個問題,而不是花費數小時的時間來調試。嘆息 – 2010-05-13 09:15:24
沒關係。我們都做到了這一點:-) – 2010-05-13 09:25:44
swf帶來了如此多的安全風險,但沒問題。 – nagytech 2013-07-04 00:55:48