This document provides an overview of HTML5 and CSS3 features including new semantic HTML5 elements, multimedia capabilities like video and canvas, geolocation, and CSS3 properties for styling like borders, backgrounds, shadows, fonts, transitions and transforms. It includes code examples and screenshots to illustrate these new capabilities.
3. This machine is a
server, DO NOT
POWER DOWN!
http://obamapacman.com/wp-content/uploads/2009/08/First-World-Wide-Web-Server-at-CERN-made-possible-by-Tim-Berners-Lee-hosted-on-Steve-Jobs-NeXT-workstation-
computer-300x225.jpg
Friday, March 18, 2011
12. device element
3D parser
HTML5
widgets Canvas
Text
Video
geolocation
HTML5
and friends
http://www.flickr.com/photos/fuyoh/809640616/sizes/o/
Friday, March 18, 2011
13. Video
source: http://zibin.tehais.com/?p=1641
Friday, March 18, 2011
16. CANVAS
http://www.canvasdemos.com
Friday, March 18, 2011
17. <canvas id="myCanvas" width="300" height="150">
Fallback content, in case the browser does not support Canvas.
</canvas>
// Get a reference to the element.
var elem = document.getElementById('myCanvas');
// Always check for properties and methods, to make sure your code doesn't break
// in other browsers.
if (elem && elem.getContext) {
// Get the 2d context.
// Remember: you can only initialize one context per element.
var context = elem.getContext('2d');
if (context) {
// You are done! Now you can draw your first rectangle.
// You only need to provide the (x,y) coordinates, followed by the width and
// height dimensions.
context.fillRect(0, 0, 150, 100);
}
}
Friday, March 18, 2011
22. if navigator.geolocation
{
navigator.geolocation.getCurrentPosition successFunction
, errorFunction ;
}
else
{
alert “no support” ;
}
function successFunction position
{
var lat = position.coords.latitude;
var long = position.coords.longitude;
alert 'Your latitude is :'+lat+' and longitude is '+long ;
}
Friday, March 18, 2011