数据URI不适用于IE10

时间:2014-07-30 10:58:09

标签: css internet-explorer-10 data-uri

<body class="cursor-success" >
    <div>
         <a><img src="/myImage.jpeg"></a>
    </div>
</body>

.cursor-success {
    cursor: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAYCAYAAAAVibZIAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAONJREFUeNrUlLESwiAMhgPmrmM7+JI6dHfxMexLdrCbQ0/8wXq2HBwJ6uDP5SjQfoQmxDrnKDbIpealZikjY4yjSmWhdKgHc3bl8vYYMt+BfgDm4hsVYBZtrQSz+EcpwKwKqxDM6nwRgLkquwtgqwYePQ025G9e2dN7tPUQCoOpu6ZePWwHbK+8vrkqhY9d6P1pGP26NWG+UVep1zFhM82AnLfeQje1p9F4j7b1djmJ2NM4EBiPNOLhtMqAZ/S7ZC1ePCkKwWmppStN6Y2rkh+QCWCSFBRV8ktLn6Uf6H+gDwEGAIkg8mOa3vMCAAAAAElFTkSuQmCC') /*/Content/images/cursor-success.png*/, auto !important;
}

Internet Explorer 10不使用游标。

1 个答案:

答案 0 :(得分:1)

Internet Explorer中不支持url()值的定位语法:

https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Browser_compatibility

对于Internet Explorer,GIF(或其他图像类型)不起作用。 需要Microsoft Windows光标(.cur)或Microsoft Windows动画光标(.ani)文件。

参考:http://www.iandevlin.com/blog/2010/03/webdev/getting-a-customised-css-cursor-to-work-in-firefox-and-internet-explorer