光标不改变为指针在Usemap /区域大小写 [英] Cursor not changing to pointer in Usemap/area case

查看:157
本文介绍了光标不改变为指针在Usemap /区域大小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下HTML代码,我无法在所有浏览器中正常工作:

I have the following HTML code which I cannot get to work quite right in all browsers:

<div id ="right_header">     
        <img id = "usemapsignin" src="/images/sign-in-panel-wo-FB.png" usemap = "#signin">
</div>      
        <map name = "signin" >
            <area shape = "rect" coords = "30,10, 150, 50" target = "_blank" alt = "signin" id="signin"
                    onMouseOver="document.images['usemapsignin'].style.cursor='pointer'"
            onMouseOut="document.images['usemapsignin'].style.cursor='auto'"/>
            <area shape = "rect" coords = "0,113, 172, 150" target = "_blank" alt = "restowner" id = "restowner"
                onclick = "alert('Hello Restaurant Owner!')"   />
        </map>

我试图在移动到usemap的一部分时将光标更改为指针。但它在Chrome / Safari中无法使用。

I am trying to change the cursor to pointer when moved over a part of the usemap. But its not working in Chrome/Safari.

任何帮助将不胜感激。

推荐答案

Chrome和Safari不支持更改地图或区域元素的CSS。在区域上获取mousepointer的唯一直接方法是:

Chrome and Safari don't support changing the CSS of map or area elements. The only straightforward way to get a mousepointer on an area is to have:

<area ... href="javascript:void(0);" />

这篇关于光标不改变为指针在Usemap /区域大小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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