相关疑难解决方法(0)

674
推荐指数
24
解决办法
91万
查看次数

样式输入类型文件?

是否可以设置文件类型的输入元素的样式而不必担心浏览器兼容性?在我的情况下,我需要实现一个背景图像和圆形边框(1px),如果可能的话,也应该定制按钮.

html css file input cross-browser

34
推荐指数
3
解决办法
19万
查看次数

在IE9上裁剪带有输入组的浏览按钮

使用bootstrap,我创建input-group了一个buttoninput type='file'.

除了以外它在各处都很好IE9.在IE9上,正在从右侧裁剪浏览按钮.

演示: http ://jsbin.com/alESiBo/6/edit

码:

<div class="input-group">
  <span class="input-group-btn">
    <button class="btn btn-default" type="button">
      <i class="icon-upload-alt"></i>&nbsp;Upload
    </button>
  </span>
  <input id="fileField" class="form-control" name="fileField" type="file" />
</div>
Run Code Online (Sandbox Code Playgroud)

输出:

IE 9.0.8112.16421

在此输入图像描述

Chrome 31.0.1650.63 m

在此输入图像描述

带快照的IE版本:

在此输入图像描述

css input-type-file internet-explorer-9 twitter-bootstrap

11
推荐指数
1
解决办法
2382
查看次数

文件输入标签点击的解决方法(Firefox)

<label for="input">Label</label><input type="file" id="input"/>
Run Code Online (Sandbox Code Playgroud)

在Firefox 7中,无法通过单击标签来触发打开的文件对话框.

这个问题非常相似,但是用绿色检查它是FF中的一个错误.我正在寻找一种解决方法.

有任何想法吗?

html firefox label file-upload

10
推荐指数
1
解决办法
2万
查看次数

CSS:如何使光标成为输入文件上的指针?

当鼠标悬停时,如何使光标成为输入文件或输入文本上的指针?

我尝试过,但当然行不通,

<input type="file" style="cursor: pointer;"/>
Run Code Online (Sandbox Code Playgroud)

或者我必须使用javascrip(jquery)?

编辑:

抱歉我的错误 - 光标确实变成了一个点

<input type="text" style="cursor: pointer;"/>
Run Code Online (Sandbox Code Playgroud)

但不上

<input type="file" style="cursor: pointer;"/>
Run Code Online (Sandbox Code Playgroud)

您可以在 Firefox 上测试此链接,然后您就会明白我的意思。

仅将buttonoffile更改为指针,但未更改input fieldof file

编辑2:

是我的 CSS 'hack',

<div id="right-col" style="position:relative; width:76px; height:24px; overflow:hidden; border:1px solid #000;">
<input type="file" style="position:absolute; top:0; right:0; z-index:2;opacity:1; cursor:pointer;"/>
</div>
Run Code Online (Sandbox Code Playgroud)

css jquery file textinput onfocus

5
推荐指数
1
解决办法
2万
查看次数