可能重复:
Making a <button> that's a link in HTML
How apply CSS to browse button样式化的浏览按钮,看起来像一个链接
如何风格的浏览按钮,看起来像一个链接?
我的意思是
<input type=file />
可能重复:
Making a <button> that's a link in HTML
How apply CSS to browse button样式化的浏览按钮,看起来像一个链接
如何风格的浏览按钮,看起来像一个链接?
我的意思是
<input type=file />
试试这个办法:
更改输入文件的不透明度为0
div.text {
position: absolute;
top: 0;
left: 0;
text-decoration: underline;
color: blue;
}
div.wrapper {
position: relative;
}
input { opacity: 0; }
<div class="wrapper">
<div class="text">I'm not a link you fool</div>
<input type="file"/>
</div>
如果你在谈论一个<input type=file />
的浏览按钮,也无法做到这一点。你必须去一个jQuery/ajax文件上传插件,用自定义的东西替换原来的按钮。看看这里的列表:
http://creativefan.com/10-ajax-jquery-file-uploaders/
,看看你是否找到你喜欢的东西。
什么浏览按钮? –