html怎么做水流地图

html-css028

html怎么做水流地图,第1张

<!DOCTYPE html>

<html>

<head>

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>地图</title>

<style type="text/css">

html{height:100%}

body{height:100%margin:0pxpadding:0px}

#container{height:100%}

</style>

<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=GbLBG0iSnUi7hvBVdWxAm0qCvK46SsFu">//2.0版本

</script>

</head>

<body>

<div id="container"></div>

<script type="text/javascript">

var map = new BMap.Map("container") // 创建地图实例

var point = new BMap.Point(119.3,26.08) // 创建点坐标

map.centerAndZoom(point, 15)// 初始化地图,设置中心点坐标和地图级别

var marker = new BMap.Marker(point) // 创建标注

map.addOverlay(marker)//将标注添加到地图中

var opts1 = {type: BMAP_NAVIGATION_CONTROL_LARGE}

map.addControl(new BMap.NavigationControl(opts1))

var opts2 = {offset: new BMap.Size(150, 5)}

map.addControl(new BMap.ScaleControl(opts2))

map.addControl(new BMap.OverviewMapControl())

map.addControl(new BMap.MapTypeControl())

map.setCurrentCity("福州")

</script>

</body>

background: url('') repeat-x

overflow-x: hide

overflow-y: scroll

再将标签高度弄大一点就可以了。