Exploring how to use canvas
This commit is contained in:
		
							
								
								
									
										23
									
								
								index.html
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								index.html
									
									
									
									
									
								
							@ -1,9 +1,24 @@
 | 
			
		||||
<html>
 | 
			
		||||
    <body>
 | 
			
		||||
    <head>
 | 
			
		||||
        <title>JDG :: Tetris JS</title>
 | 
			
		||||
        <script src="tetris.js"></script>
 | 
			
		||||
    </body>
 | 
			
		||||
    <head>
 | 
			
		||||
        <div id="app"></div>
 | 
			
		||||
        <style>
 | 
			
		||||
            html, body {
 | 
			
		||||
                width: 100%;
 | 
			
		||||
                height: 100%;
 | 
			
		||||
                padding: 0;
 | 
			
		||||
                margin: 0;
 | 
			
		||||
            }            
 | 
			
		||||
            #app{     
 | 
			
		||||
                position: fixed; /* absolute */
 | 
			
		||||
                top: 0;
 | 
			
		||||
                left: 0;
 | 
			
		||||
                width: 100vw;    /* 100% */
 | 
			
		||||
                height: 100vh;   /* 100% */ 
 | 
			
		||||
            }
 | 
			
		||||
        </style>
 | 
			
		||||
    </head>
 | 
			
		||||
    <body>
 | 
			
		||||
        <canvas id="app"></canvas>
 | 
			
		||||
    </body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user