HTML and CSS Reference
In-Depth Information
Figure 5-8. Multiple balls bouncing while the canvas is resized on the fly
Example 5-6. Multiple ball bounce with dynamically resized canvas
<!doctype html>
<html
<html lang= "en" >
<head>
<head>
<meta
<meta charset= "UTF-8" >
<title>
<title> CH5EX6: Multiple Ball Bounce With Resize </title>
</title>
< script src = "modernizr.js" >< /script>
< script type = "text/javascript" >
window . addEventListener ( 'load' , eventWindowLoaded , false
false );
function
function eventWindowLoaded () {
canvasApp ();
} function
function canvasSupport () {
return
return Modernizr . canvas ;
}
function
function canvasApp () {
iif ( ! canvasSupport ()) {
Search WWH ::




Custom Search