如何改变按钮的文本和颜色浏览输入文件? [英] How change text and color of button Browse of input file?

查看:153
本文介绍了如何改变按钮的文本和颜色浏览输入文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将输入文件设计为:

I design a input file as:

 <input type="file" name="file" id="file" size="52"   />      

我想改变按钮Browse ..的文字和颜色。你可以帮我吗?感谢所有。

I want to change text and color of button "Browse..". Can you help me? thanks all.

推荐答案

外观和功能都可以,但这不是您真正期望的。

Appearance and functionality is ok, but this is not your real expected one. think this is help to you.

 <input type="text" id="fileName" readonly="readonly" >
 <div class="file_input_div" style="display: inline;">
 <input type="button" id="button" value="Open"/>
 <input type="file"  style="opacity:0; position:relative; left:-40px;"  onchange="javascript: document.getElementById ('fileName') . value = this.value"/>
 </div>

CSS

CSS

​#button{
position: relative;
left:-1px;
background-color:#446655;
}​

DEMO

这篇关于如何改变按钮的文本和颜色浏览输入文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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