Firefox下input file的width
我的测试代码如下:
        <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        <title>test</title>
        </head>
        <body>
	<input style="width:1px" size="1" name="file" type="file">
        </body>
        </html>
     发现当去掉size="1"后,在Firefox下width:1px无效,小弟想实现“浏览”覆盖文本框的效果,
     即只显示“浏览”按钮,不显示文本框。以上代码在IE下基本符合我的需求,
     但在Firefox下总有宽约10px的文本框显示出来,请各位大侠指点下下,非常感谢!!!
     (Firefox测试版本:3.6.11)
------解决方案--------------------
可以这样做:
自己建立个按键样式。
将 input[file] 透明度设置为0,absolute 到自定义按键上。
这样点击按键实际上是点击 input[file] 。