css实现热点(hotspot,地图提示)


地图弹窗(map pop)具体演示

<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"
/>
<title>CSS实例讲解:地图提示(map pop)档</title>
<style type="text/css" media="all">
* { margin:0; padding:0;
}
img { border:0;
}
#show{ text-align:left;
}
ul { list-style-type:none; background: transparent
url(http://v1.planabc.net/demo/images/map_flat.jpg) no-repeat 0 0;
width:350px; height:250px; border:1px solid #000;
}
ul li { display:inline;
}
ul li a { position:relative; display:block; text-decoration:none;
}
ul li a span.offset { position:absolute; margin-top:-9000px;
margin-left:-9000px; }
ul li a:hover span.offset, ul li a:focus span.offset, ul li a:active
span.offset { color: #000; background-image:none;
background-color:#ffffde; border:1px solid #000; display:block;
width:150px; height:auto; text-decoration:none; cursor:pointer;
}
ul li a:hover span.offset span, ul li a:focus span.offset span, ul li
a:active span.offset span { display:block; width:140px; margin:5px;
height:120px;
}
ul li a#map01 { width:80px; height:60px; margin-top:0;
margin-left:130px;
}
ul li a#map01:hover, ul li a#map01:focus, ul#cmp li a#map01:active {
background:transparent
url(http://v1.planabc.net/demo/images/map_flat_on.jpg) no-repeat -130px
0px;
}
ul li a#map01:hover span.offset, ul li a#map01:focus span.offset, ul li
a#map01:active span.offset { margin-top:-1px; margin-left:230px;
}
ul li a#map02 { width:110px; height:75px; margin-top:-50px;
margin-left:235px;
}
ul li a#map02:hover, ul li a#map02:focus, ul li a#map02:active {
background:transparent
url(http://v1.planabc.net/demo/images/map_flat_on.jpg) no-repeat -235px
-10px;
}
ul li a#map02:hover span.offset, ul li a#map02:focus span.offset, ul li
a#map02:active span.offset { margin-top:-11px; margin-left:125px;
}
ul li a#map03 { width:75px; height:95px; margin-top:3px;
margin-left:115px;
}
ul li a#map03:hover, ul li a#map03:focus, ul li a#map03:active {
background:transparent
url(http://v1.planabc.net/demo/images/map_flat_on.jpg) no-repeat -115px
-88px;
}
ul li a#map03:hover span.offset, ul li a#map03:focus span.offset,ul li
a#map03:active span.offset { margin-top:-89px; margin-left:245px;
}
ul li a#map04 { width:110px; height:120px; margin-top:-60px;
margin-left:5px;
}
ul li a#map04:hover, ul li a#map04:focus, ul li a#map04:active {
background:transparent
url(http://v1.planabc.net/demo/images/map_flat_on.jpg) no-repeat -5px
-123px;
}
ul li a#map04:hover span.offset, ul li a#map04:focus span.offset, ul li
a#map04:active span.offset { margin-top:-124px; margin-left:355px;
}
ul li a#map05 { width:95px; height:97px; margin-top:-90px;
margin-left:240px;
}
ul li a#map05:hover, ul li a#map05:focus, ul li a#map05:active {
background:transparent
url(http://v1.planabc.net/demo/images/map_flat_on.jpg) no-repeat -240px
-153px;
}
ul li a#map05:hover span.offset, ul li a#map05:focus span.offset, ul li
a#map05:active span.offset { margin-top:-154px; margin-left:120px;
}
</style>
</head>
<body> <ul> <li><a id="map01"
href="http://j5c.ddvip.com/index.php#map01"><span class="offset"><img
src="http://v1.planabc.net/demo/images/map1.jpg" alt="Post Office"
/><span>This is the Popsville community <strong>Post
Office</strong>, your home of over-priced postage. Click map for
more</span></span></a></li> <li><a
id="map02" href="http://j5c.ddvip.com/index.php#map02"><span class="offset"><img
src="http://v1.planabc.net/demo/images/map2.jpg" alt="Dew Drop Inn"
/><span>Home is where the beer is. And that means the
<strong>Dew Drop Inn</strong>. Live music on the weekends.
Click map for more</span></span></a></li>
<li><a id="map03" href="http://j5c.ddvip.com/index.php#map03"><span
class="offset"><img
src="http://v1.planabc.net/demo/images/map3.jpg" alt="River Beach"
/><span>Spend lazy summer afternoons at the beautiful
<strong>River Beach</strong>. Hang out on the nude beach.
Click map for more</span></span></a></li>
<li><a id="map04" href="http://j5c.ddvip.com/index.php#map04"><span
class="offset"><img
src="http://v1.planabc.net/demo/images/map4.jpg" alt="Woodland Traders"
/><span>Our local <strong>Woodland
Traders</strong> is a veritable Mecca of consumer goods and
hardware. Click map for
more</span></span></a></li> <li><a
id="map05" href="http://j5c.ddvip.com/index.php#map05"><span class="offset"><img
src="http://v1.planabc.net/demo/images/map5.jpg" alt="Wild Game Diner"
/><span>Country living means road kill, and the
<strong>Wild Game Diner</strong> prepares it with special
sauce. Click map for
more</span></span></a></li> </ul>
</body>
</html>



相关阅读:
利用迭代器在.NET中实现“超轻量级线程”
JS 建立对象的方法
discuz 分类信息设置教程(图文教程、DZX系列)
用CSS开发时髦的导航栏图例教程
php网页后退不再出现过期
只需五个小技巧便能让xp系统更快运行
window.onload和body onload
非常不错的模拟打字效果,目前仅支持纯文本、BR标签、和P标签
PHP基础教程(6):PHP运算符
JavaScript的类型简单说明
CSS:相同元素不同结构重复定义的问题
Linux下建立GPRS无线Modem拨号方法
js:校验IPv6地址的正则表达式
在Jsp Servlet中页面重新定向总汇
快速导航

Copyright © 2016 phpStudy | 皖ICP备18014864号-4