我有以下 HTML 代码:
<input type='file' class="" maxlength="96" size="16" value="" name='headshot' id='headshot' style="width:21.5em;"/>
似乎“大小”值控制“爆头”的实际宽度而不是 CSS。 为了使它成为理想的宽度,我必须使用以下代码:
<input type='file' class="" maxlength="96" size="32" value="" name='headshot' id='headshot' style="width:21.5em;"/>
你知道为什么 CSS 在这里不起作用吗?我已经在 Firefox 3.6.8 中测试了上面的代码。
谢谢
最佳答案
Fortunately, reader Michael McGrady invented a very neat trick that allows us to (more or less) style file upload fields
关于html - CSS - 为什么文件上传控件不遵循 CSS 宽度规则?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3349846/