如何将CSS应用于浏览按钮 [英] How apply CSS to browse button

查看:129
本文介绍了如何将CSS应用于浏览按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的网页中使用< input type =file/> 。我有不同的CSS类的按钮和其他控件。

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?

感谢您提前。

推荐答案

您只能对整个< input /> 应用样式。

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

您可以使用 opacity:0 CSS hack将其替换为您最喜欢的图片和图片:hover。

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

请记住, height:属性将无法在Firefox 3.6上运行;您可以使用 font-size:来放大高度。

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

我有一个例子: http://timc.idv.tw/html5-file-upload/ ;检查第二个演示的CSS。

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

这篇关于如何将CSS应用于浏览按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆