Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <link rel="stylesheet" type="text/css" href="../css/style.css">
- canvas {
- position: absolute;
- width: '100%';
- height: Ti.UI.SIZE;
- top: 0;
- bottom: 0;
- left: 0;
- right:0;
- background-color: yellow;
- }
- <script type="text/javascript" src="../scripts/main.js"></script>
- var canvas = document.getElementById("canvas");
- var ctx = canvas.getContext("2d");
- ctx.fillStyle = "blue";
- ctx.fillRect(0, 0, canvas.width, canvas.height);
- ctx.fillStyle = "red";
- ctx.fillRect(10, 10, 40, 40);
Add Comment
Please, Sign In to add comment