中国地图鼠标经过省份热点弹出提示信息的网页特效

2024-01-08 04:58

本文主要是介绍中国地图鼠标经过省份热点弹出提示信息的网页特效,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

把下面代码复制一下放到txt中保存成html就可以了:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>中国地图鼠标经过省份热点弹出提示信息的网页特效 by js.alixixi.com</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<script src="http://code.jquery.com/jquery-1.7.min.js" type="text/javascript"></script>
<style type="text/css">
.map img { width:496px; height: 415px; }
.mapDiv { width:140px; height:61px; padding: 5px; color:#369; background: url('http://static.blueidea.com/attachment/forum/201203/15/153950vvth6ctbmx45kh4t.gif') no-repeat; position:absolute; display: none; word-break:break-all; }
</style><script type="text/javascript">$(document).ready(function(){$("area").each(function(){var $x=-70;var $y=-80; var name=$(this).attr("alt"); $(this).mouseover(function(e){var index_num=$(this).index();var dom="<div class='mapDiv'><p>提示消息 by js.allixixi.com<span class='name'></span><span class='num'></span></p></div>";$("body").append(dom);$(".name").text(name);$(".num").text(index_num)$(".mapDiv").css({top: (e.pageY + $y)+"px",left: (e.pageX + $x)+"px"}).show("fast");}).mouseout(function(){    $(".mapDiv").remove();}).mousemove(function(e){$(".mapDiv").css({top: (e.pageY + $y)+"px",left: (e.pageX + $x)+"px"})});});   })
</script>
</head>
<body>
<div class="map">
<img border="0" usemap="#Map" src="http://static.blueidea.com/attachment/forum/201203/15/1544302yufceen0c3nbjzu.png" />
<map name="Map" id="Map"><area id="beijing" alt="北京" href="forum.php?gid=1" coords="354,140,380,153" shape="rect"><area id="shanghai" alt="上海" href="forum.php?gid=3" coords="434,246,462,259" shape="rect"><area id="tianjin" alt="天津" href="forum.php?gid=2" coords="382,168,408,180" shape="rect"><area id="chongqing" alt="重庆" href="forum.php?gid=4" coords="294,264,320,276" shape="rect"><area id="hebei" alt="河北" href="forum.php?gid=5" coords="347,174,374,186" shape="rect"><area id="shanxi" alt="山西"  href="forum.php?gid=6" coords="322,186,348,198" shape="rect"><area id="neimenggu" alt="内蒙古" href="forum.php?gid=7" coords="349,110,388,124" shape="rect"><area id="liaoning" alt="辽宁" href="forum.php?gid=8" coords="406,128,432,140" shape="rect"><area id="jilin" alt="吉林" href="forum.php?gid=9" coords="427,101,454,115" shape="rect"><area id="heilongjiang" alt="黑龙江" href="forum.php?gid=10" coords="424,58,464,73" shape="rect"><area id="jiangsu" alt="江苏" href="forum.php?gid=11" coords="404,224,417,250" shape="rect"><area id="zhejiang" alt="浙江" href="forum.php?gid=12" coords="413,265,427,291" shape="rect"><area id="anhui" alt="安徽" href="forum.php?gid=13" coords="382,236,395,263" shape="rect"><area id="fujian" alt="福建" href="forum.php?gid=14" coords="399,300,413,327" shape="rect"><area id="jiangxi" alt="江西" href="forum.php?gid=15" coords="371,286,385,313" shape="rect"><area id="shandong" alt="山东" href="forum.php?gid=16" coords="373,196,399,208" shape="rect"><area id="henan" alt="河南" href="forum.php?gid=17" coords="337,228,364,239" shape="rect"><area id="hubei" alt="湖北" href="forum.php?gid=18" coords="329,258,356,271" shape="rect"><area id="hunan" alt="湖南" href="forum.php?gid=19" coords="325,294,352,306" shape="rect"><area id="guangdong" alt="广东" href="forum.php?gid=20" coords="356,343,382,355" shape="rect"><area id="guangxi" alt="广西" href="forum.php?gid=21" coords="302,343,328,355" shape="rect"><area id="hainan" alt="海南" href="forum.php?gid=22" coords="313,398,340,411" shape="rect"><area id="sichuan" alt="四川" href="forum.php?gid=23" coords="239,265,265,277" shape="rect"><area id="guizhou" alt="贵州" href="forum.php?gid=24" coords="283,311,308,324" shape="rect"><area id="yunnan" alt="云南" href="forum.php?gid=25" coords="225,337,251,349" shape="rect"><area id="shaanxi" alt="陕西" href="forum.php?gid=26" coords="303,224,316,251" shape="rect"><area id="gansu" alt="甘肃" href="forum.php?gid=27" coords="179,156,205,168" shape="rect"><area id="qinghai" alt="青海" href="forum.php?gid=28" coords="174,206,200,218" shape="rect"><area id="ningxia" alt="宁夏" href="forum.php?gid=29" coords="277,188,290,212" shape="rect"><area id="xinjiang" alt="新疆" href="forum.php?gid=30" coords="85,140,111,152" shape="rect"><area id="xizang" alt="西藏" href="forum.php?gid=31" coords="87,249,113,261" shape="rect"><area id="xianggang" alt="香港" href="forum.php?gid=32" coords="379,358,406,370" shape="rect"><area id="aomen" alt="澳门" href="forum.php?gid=33" coords="349,371,375,383" shape="rect"><area id="taiwan" alt="台湾" href="forum.php?gid=34" coords="434,322,448,348" shape="rect">
</map>
</div>
</body>
</html>

 

这篇关于中国地图鼠标经过省份热点弹出提示信息的网页特效的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/582386

相关文章

HTML5 getUserMedia API网页录音实现指南示例小结

《HTML5getUserMediaAPI网页录音实现指南示例小结》本教程将指导你如何利用这一API,结合WebAudioAPI,实现网页录音功能,从获取音频流到处理和保存录音,整个过程将逐步... 目录1. html5 getUserMedia API简介1.1 API概念与历史1.2 功能与优势1.3

springboot项目中整合高德地图的实践

《springboot项目中整合高德地图的实践》:本文主要介绍springboot项目中整合高德地图的实践,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录一:高德开放平台的使用二:创建数据库(我是用的是mysql)三:Springboot所需的依赖(根据你的需求再

使用Python实现网页表格转换为markdown

《使用Python实现网页表格转换为markdown》在日常工作中,我们经常需要从网页上复制表格数据,并将其转换成Markdown格式,本文将使用Python编写一个网页表格转Markdown工具,需... 在日常工作中,我们经常需要从网页上复制表格数据,并将其转换成Markdown格式,以便在文档、邮件或

一文教你Python如何快速精准抓取网页数据

《一文教你Python如何快速精准抓取网页数据》这篇文章主要为大家详细介绍了如何利用Python实现快速精准抓取网页数据,文中的示例代码简洁易懂,具有一定的借鉴价值,有需要的小伙伴可以了解下... 目录1. 准备工作2. 基础爬虫实现3. 高级功能扩展3.1 抓取文章详情3.2 保存数据到文件4. 完整示例

使用Python和Pyecharts创建交互式地图

《使用Python和Pyecharts创建交互式地图》在数据可视化领域,创建交互式地图是一种强大的方式,可以使受众能够以引人入胜且信息丰富的方式探索地理数据,下面我们看看如何使用Python和Pyec... 目录简介Pyecharts 简介创建上海地图代码说明运行结果总结简介在数据可视化领域,创建交互式地

python获取网页表格的多种方法汇总

《python获取网页表格的多种方法汇总》我们在网页上看到很多的表格,如果要获取里面的数据或者转化成其他格式,就需要将表格获取下来并进行整理,在Python中,获取网页表格的方法有多种,下面就跟随小编... 目录1. 使用Pandas的read_html2. 使用BeautifulSoup和pandas3.

Python获取中国节假日数据记录入JSON文件

《Python获取中国节假日数据记录入JSON文件》项目系统内置的日历应用为了提升用户体验,特别设置了在调休日期显示“休”的UI图标功能,那么问题是这些调休数据从哪里来呢?我尝试一种更为智能的方法:P... 目录节假日数据获取存入jsON文件节假日数据读取封装完整代码项目系统内置的日历应用为了提升用户体验,

Redis 中的热点键和数据倾斜示例详解

《Redis中的热点键和数据倾斜示例详解》热点键是指在Redis中被频繁访问的特定键,这些键由于其高访问频率,可能导致Redis服务器的性能问题,尤其是在高并发场景下,本文给大家介绍Redis中的热... 目录Redis 中的热点键和数据倾斜热点键(Hot Key)定义特点应对策略示例数据倾斜(Data S

使用Python实现获取网页指定内容

《使用Python实现获取网页指定内容》在当今互联网时代,网页数据抓取是一项非常重要的技能,本文将带你从零开始学习如何使用Python获取网页中的指定内容,希望对大家有所帮助... 目录引言1. 网页抓取的基本概念2. python中的网页抓取库3. 安装必要的库4. 发送HTTP请求并获取网页内容5. 解

Python使用DrissionPage中ChromiumPage进行自动化网页操作

《Python使用DrissionPage中ChromiumPage进行自动化网页操作》DrissionPage作为一款轻量级且功能强大的浏览器自动化库,为开发者提供了丰富的功能支持,本文将使用Dri... 目录前言一、ChromiumPage基础操作1.初始化Drission 和 ChromiumPage