在输入类型=“文件”上更改光标类型 [英] Change cursor type on input type="file"

查看:136
本文介绍了在输入类型=“文件”上更改光标类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

简单问题...如何更改文件输入类型上的光标类型?

Simple question... How do I change the cursor type on a file input type?

我尝试了以下操作:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
    <head>
        <style>
            input[type="file"] {
              cursor: pointer;
            }
        </style>
    </head>
    <body>
        <input type="file">
    </body>
</html>

由于某些原因,它不会弹球。

For some reason, it won't play ball.

推荐答案

我在这里使用jquery做了一个解决方案:
http://jsfiddle.net/gKVKm/36/

I made a solution with jquery here: http://jsfiddle.net/gKVKm/36/

查看这里查看发生了什么:

它适用于我在
Opera,Safari, Chrome和Firefox。

It works for me in Opera, Safari, IE, Chrome and Firefox.

这篇关于在输入类型=“文件”上更改光标类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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