HTML 태그 - canvas
본문
HTML 태그 - canvas
<canvas>태그는 스크립트(보통 자바스크립트)를 통해 그래픽을 그리는데 사용합니다. 그래프를 그리거나 사진합성, 애니메이션을 포함한 애플리케이션을 만들 수 있습니다. html5에서 추가된 태그입니다.
속성
id : canvas인식 속성으로 값은 canvas입니다.
width : canvas좌표공간의 너비값으로 기본값은 300pixel입니다.
height : canvas좌표공간의 높이값으로 기본값은 150pixel입니다.
샘플
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="코리아뉴스" />
<title> html공부 </title>
<link rel="stylesheet" type="text/css" href="default.css" / >
<style type="text/css">
body {
color:red;
}
</style>
</head>
<body>
<section>
<h1>canvas태그</h1>
<p>
<canvas id="canvas" width="300" height="150">
이 브라우저는 캔버스를 지원하지 않습니다.
</canvas>
</p>
</section>
<div id="related">
<p>영역 </p>
</div>
<footer>
<address> 전화 : 031-574-3659, E-mail : master@koreanews.com </address>
Copyright ⓒ 2013 Koreanews co., All Rights Reserved.
</footer>
</body>
</html>
- 이전글HTML 태그 - caption 14.12.11
- 다음글HTML 태그 - button 14.12.11