HTML5入门学习笔记

HTML5入门学习笔记

1.canvas标签

<canvas></canvas><!--canvas标签定义图形,比如图标和其他图像-->
<!-- html5的canvas元素使用Javascript在网页上绘制图像
画布是一个矩形区域,可以控制每一个像素
canvas有多种绘制路径、矩形、圆形、字符及添加图像的方法
-->
<script type="text/javascript">
<!--
var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
//-->
</script>

HTML5入门学习笔记


ArcGIS API for JavaScript
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ArcGIS API for JavaScript</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9">
<meta content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link href="https://js.arcgis.com/3.6/js/esri/css/esri.css">
<style>
html, body, #mapDiv {
padding: 0;
margin: 0;
height: 100%;
}
</style>
<script src="https://js.arcgis.com/3.6/"></script>
<script>
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("mapDiv", {
center: [111.324, 30.676],
zoom: 5,
basemap: "streets"
});
});
</script>
</head>
<body>
<div></div>
</body>
</html>

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/706a74f52c1bdc127417fcab56053c81.html