地图上光标样式问题

dld11111 2010-01-07 04:38:55
我把google地图放进div,然后给div自定义光标样式。
可是,只能表现出小手那个样式。哪位高手说一下能解决吗?
...全文
184 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
dld11111 2010-01-07
  • 打赏
  • 举报
回复
恩,对#9说的,怎么引用我自己的了,CSDN bug?
dld11111 2010-01-07
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 dld11111 的回复:]
好的,谢谢!原来是我css水平不行
[/Quote]
这位仁兄,我已经结贴了。
iwdown 2010-01-07
  • 打赏
  • 举报
回复
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312"/>
<title>Google Maps JavaScript API Example </title>
<script src="http://ditu.google.com/maps?file=api&v=2&key=ABQIAAAAPr2lg_u1GjwBae5jGI7LVRR7ZeNdEDFZ60daBOzX0qLOwUWzGRTzdd3JdKOyd6mvqWKZ-w6MO2yBUw" type="text/javascript"></script>
<script type="text/javascript">
function initialize()
{
if (GBrowserIsCompatible())
{
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(39.9493, 116.3975), 13);
}
}
</script>
<style>
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.map {
height: 500px;
width: 800px;
}
.map div div div div img{
cursor:url(http://www.javatimes.cn/images/3dgmove.cur), default;;
}

</style>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" class="map"></div>
</body>
</html>


接分
dld11111 2010-01-07
  • 打赏
  • 举报
回复
好的,谢谢!原来是我css水平不行
浪尖赏花 2010-01-07
  • 打赏
  • 举报
回复
试试
@charset "gb2312";
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.map {
height: 500px;
width: 800px;
}
.map img{
CURSOR: url(../images/pencil.cur);
}
dld11111 2010-01-07
  • 打赏
  • 举报
回复
代码很简单:
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://ditu.google.cn/maps?file=api&v=2&ie=gb2312&oe=gb2312&hl=zh-CN&key=abcdefg&sensor=true_or_false" type="text/javascript"></script>
<script type="text/javascript">
function initialize()
{
if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(39.9493, 116.3975), 13);
}
}
</script>
<link href="../images/css/map.css" rel="stylesheet" type="text/css" />
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" class="map"></div>
</body>
</html>

以下为css
@charset "gb2312";
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.map {
height: 500px;
width: 800px;
CURSOR: url(../images/pencil.cur);
}
dld11111 2010-01-07
  • 打赏
  • 举报
回复
我们还能控制吗?
trest 2010-01-07
  • 打赏
  • 举报
回复
地图上所有的操作Google都封在js里了 不知道怎么搞...
浪尖赏花 2010-01-07
  • 打赏
  • 举报
回复
[Quote=引用楼主 dld11111 的回复:]
我把google地图放进div,然后给div自定义光标样式。
可是,只能表现出小手那个样式。哪位高手说一下能解决吗?
[/Quote]
方便给出测试代码吗?我研究下
dld11111 2010-01-07
  • 打赏
  • 举报
回复
自己沙发,呼唤高手
孟子E章 2010-01-07
  • 打赏
  • 举报
回复
那个是google自己控制的吧,以便用户操作
具体没细看

87,907

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧