在图像映射区域设置光标[带CSS]

Bar*_*art 7 css

有没有什么办法来设置cursor一个上area与CSS元素?似乎没有.这段代码似乎什么都不做.

CSS

area {cursor: help;}
Run Code Online (Sandbox Code Playgroud)

HTML

<img src="blah.png" width="800" height="550" alt="Blah" usemap="#blah-map">
<map name="blah-map">
    <area shape="rect" coords="104,86,210,113" href="okgo.htm" alt="OK Go">
</map>
Run Code Online (Sandbox Code Playgroud)

我能够想到的最好的黑客就是绝对在该区域的顶部放置一个链接,并给它一个光标样式.

小智 13

我最近有一个问题,正确显示在Firefox中的css光标,但不是在chrome或safari中.

长话短说,我最终需要设置显示:块; 在区域标签上.我的基本css或浏览器默认显示标签:none;

这是我创建的快速测试用例(在这里查看)

<img usemap="#map" src="http://i.imgur.com/9EcEvkn.jpg" height="120" width="100" />
<map name="map" id="map">
<area shape="rect" coords="0,0,120,100" href="#" />
</map>

area {
    cursor: crosshair;
    display:block;
}
Run Code Online (Sandbox Code Playgroud)

希望这有助于某人.