改变文件浏览按钮的样式 [英] changing style of file browse button

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

问题描述


可能重复:



如何使用CSS3 / Javascript来设置输入文件的样式?

可以更改< input type ='file'/> ;

如果是,如何更改? chrome显示在文件浏览输入中选择的文件名。

If yes , how to change? chrome shows file name which i have been chosen in file browse input.

如何在文件浏览输入中隐藏文件名?

How to Hide file name in file browse input?

推荐答案

不能,不能更改。

一个戏法广泛分布在网络周围。这个想法是给< input type =file/> 不透明度值 0.1 它在图象顶部。对于所有实际目的,它将是不可见的,只有图片将可见,但它会收到鼠标点击。使用一些Javascript,您可以在页面的其他位置显示所选的文件名。

However there is a trick widely circulated around the web. The idea is to give the <input type="file"/> an opacity value of 0.1 and position it on top of an image. For all practical purposes it will be invisible and only the picture will be visible, but it will receive mouse clicks. With some Javascript then you can show the selected file name(s) elsewhere on the page.

这篇关于改变文件浏览按钮的样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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