HTML and CSS Reference
In-Depth Information
F IGURE 2-3 Faking 3D with perspective
properly is often a function more of what you may know about basic geometry and drawing
than anything else.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> Canvas Cube Example </title>
<style type="text/css" media="screen">
body {background-color: #E67B34;}
</style>
<script type="text/javascript">
window.onload = function(){
var context = document.getElementById("canvas").getContext("2d");
context.fillStyle = "#fff";
context.strokeStyle = "black";
context.beginPath();
context.moveTo(188,38);
context.lineTo(59,124);
Search WWH ::




Custom Search