Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using <input type="file" /> in my webpage. I've different CSS classes for button and other controls. But I'm not able to add any class, style to browse button that appears due to above tag.

Is there any way to change its default appearance?

Thanks is advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
375 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can't do that. You could only apply style to the entire <input />.

You could use opacity: 0 CSS hacks to replace it with you favorite image and image:hover.

Keep in mind that height: property will not work on Firefox 3.6; You could use font-size: to enlarge the height instead.

I have an example made: http://timc.idv.tw/html5-file-upload/ ; inspect the CSS of the 2nd demo.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...