来源:http://stackoverflow.com/questions/1537223/change-cursor-type-on-input-type-file

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

I've tried the following:

<!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.

--------------以下是回复----------------------------

It works differently in different browsers. I guess it's because the file input type is quite special.

What browser/version do you use?

I know that IE6 does not support to specify the type in the style.

How it works in the different browsers

IE7+

Works perfectly

FireFox

Does not work at all.

Chrome and Safari (identical behavior)

Uses arrow over the button, but your defined cursor over the rest.

Opera

Uses your defined cursor when entering any part from outside the input element, but the default cursor is used when moving mouse internally between text field and button (text cursor over the text field, and arrow over the button).

如何给input[file]定义cursor的更多相关文章

  1. chrome 下 input[file] 元素cursor设置pointer不生效的解决

    https://jingyan.baidu.com/article/48b558e32fabb67f38c09a81.html 环境是chrome浏览器,今天发现为html网页中的input [fil ...

  2. 自定义input file样式

    自定义input file样式:一般都是通过隐藏input,通过定义label来实现.这种做法要注意的是label的for属性要指定input对应的id; <!DOCTYPE html> ...

  3. 编译安装mmseg提示cannot find input file: src/Makefile.in错误

    今天安装中文词检索功能模块 coreseek,其中一个分词模块 mmseg ,编译安装到最后,出现annot find input file: src/Makefile.in aclocal   // ...

  4. 从重置input file标签中看jQuery的 .val() 和 .attr(“value”) 区别

    背景: 在清空input file标签选中值时,分别用了以下方法,发现有的对有的错: [√]$("#file")[0].value = ""; [√]$(&qu ...

  5. Nginx执行php显示no input file specified的处理方法

    /var/www/nginx-default中放上一份phpinfo.php,使用http://localhost/phpinfo.info 访问,结果报错,显示 “No input file spe ...

  6. html input file标签的上传文件 注意点

    文件上传框  代码格式:<input type=“file” name=“...” size=“15” input enctype="multipart/form-data“ maxl ...

  7. ajax+ashx 完美实现input file上传文件

    1.input file 样式不能满足需求 <input type="file" value="浏览" /> IE8效果图:    Firefox效 ...

  8. input file 在开发中遇到的问题 类似ajax form表单提交 input file中的文件

    最近在做项目的过程中遇到个问题,在这里做个记录防止日后忘记 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为 ...

  9. ajax form表单提交 input file中的文件

    ajax form表单提交 input file中的文件 现今的主流浏览器由于ajax提交form表单无法把文件类型数据提交到后台,供后台处理,可是开发中由于某些原因又不得不用ajax提交文件, 为了 ...

随机推荐

  1. [2015hdu多校联赛补题]hdu5299 Circles Game

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5299 题意: 在欧几里得平面上有n个圆,圆之间不会相交也不会相切,现在Alice和Bob玩游戏,两人轮 ...

  2. machine learning----->有监督学习和无监督学习的区别

    1.有监督学习和无监督学习的区别: 1.1概述: 有监督学习是知道变量值(数据集)和结果(已知结果/函数值),但是不知道函数样式(函数表达式)的情况下通过machine learning(ML)获得正 ...

  3. Composite(组合)--对象结构型模式

    1.意图 将对象组合成树形结构以表示“部分-整体”的层次结构.Composite使得用户对单个对象和组合对象的使用具有一致性. 2.动机 可以组合多个简单组件以形成一些较大的组件,这些组件又可以组合成 ...

  4. nginx反向代理编译异常

    cc1: warnings being treated as errors /root/nginx_tcp_proxy_module/ngx_tcp.c: 在函数‘ngx_tcp_add_addrs’ ...

  5. hdu 3254 (状压DP) Corn Fields

    poj 3254 n乘m的矩阵,1表示这块区域可以放牛,0,表示不能,而且不能在相邻的(包括上下相邻)两个区域放牛,问有多少种放牛的方法,全部不放也是一种方法. 对于每块可以放牛的区域,有放或者不放两 ...

  6. mormot orm rest注意事项

    mORMot创建ORM RestFul,当CreateMissingTables的时候报错,搜了n多资料没搞定,后来胡乱建了个表测试了一通搞定了. ORM对应的每个数据表都需要一个ID字段并设置主键, ...

  7. Segmetation fault你来的真不是时候

    问题是这样的,今天一个简单的C程序,用gcc编译成汇编语言后,本来想在里面改点东西,结果运行时就报了"Segmetation fault".它丫来的还真不是时候,刚好最近正好烦它呢 ...

  8. SublimeText为啥选择Python开发extension

    真正优秀的软件是靠优秀的程序员开发出来的,反过来也一样,优秀的语言,平台,工具只有在优秀的程序员的手中才能显现出它的威力. 比如,Jon Skinner开发的SublimeText.桌面应用一般支持二 ...

  9. hp小机定位网卡位置

    rad已经被olrad取代 HPUX下定位网卡位置                                                   一台HP小型机,可能配了多块网卡,在系统中以la ...

  10. 互联网云生态下DDOS安全产品的一些考虑和测试方法(一)

    DDOS攻击简介 安全的三要素——“保密性”.“完整性”和“可用性”中,DOS(Denial of Service拒绝服务攻击)所针对的目标是服务的“可用性”.这种攻击方式利用目标系统的网络服务功能缺 ...