标签:
HTML5的vedio和audio元素,二者的兼容性目前不少很好,所以在写的时候要考虑到备用方案;
HTML5表单元素:email, url , data, number, range, search, tel, color
下面再放一个canvas的小实例:
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>canvas小实例</title> </head> <body> <canvas id="draw-in-me" width="120" heigt="40"> <p>Powered By HTML5 canvas</p> </canvas> <script> function draw(){ var canvas = document.getElementById(‘draw-in-me‘); if(canvas.getContext){ var ctx = canvas.getContext(‘2d‘); ctx.beginPath(); ctx.moveTo(120.0,32.0); ctx.bezierCurveTo(120.0, 36.4, 116.4, 40.0, 112.0, 40.0); ctx.lineTo(8.0, 40.0); ctx.bezierCurveTo(3.6, 40.0, 0.0, 36.4, 0.0, 32.0); ctx.lineTo(0.0, 8.0); ctx.bezierCurveTo(0.0, 3.6, 3.6, 0.0, 8.0, 0.0); ctx.lineTo(112.0, 0.0); ctx.bezierCurveTo(116.4, 0.0, 120.0, 3.6, 120.0, 8.0); ctx.lineTo(120.0, 32.0); ctx.closePath(); ctx.fill(); ctx.lineWidth = 2.0; ctx.strokeStyle = "rgb(255, 255, 255)"; ctx.stroke(); } } draw(); </script> </body> </html>
JS DOM编程艺术——HTML5—— JS学习笔记2015-7-24(第91天)
标签:
原文地址:http://www.cnblogs.com/zhangxg/p/4675077.html