|
| 1 | +<!doctype HTML> |
| 2 | +<meta charset="utf-8"> |
| 3 | +<title>HTML5 Canvas Test Reference: The lang attribute.</title> |
| 4 | +<link rel=" author" href=" mailto:[email protected]" /> |
| 5 | +<style> |
| 6 | + #canvas1 { |
| 7 | + position: absolute; |
| 8 | + left: 0px; |
| 9 | + top: 0px; |
| 10 | + } |
| 11 | + #canvas2 { |
| 12 | + position: absolute; |
| 13 | + left: 0px; |
| 14 | + top: 50px; |
| 15 | + } |
| 16 | + #canvas3 { |
| 17 | + position: absolute; |
| 18 | + left: 0px; |
| 19 | + top: 100px; |
| 20 | + } |
| 21 | + #canvas4 { |
| 22 | + position: absolute; |
| 23 | + left: 0px; |
| 24 | + top: 150px; |
| 25 | + } |
| 26 | +</style> |
| 27 | +<script> |
| 28 | + function generateReference() { |
| 29 | + var canvas1 = document.getElementById('canvas1'); |
| 30 | + var ctx1 = canvas1.getContext('2d'); |
| 31 | + ctx1.font = '25px serif'; |
| 32 | + ctx1.fillText('今骨直', 60, 30); |
| 33 | + |
| 34 | + var canvas2 = document.getElementById('canvas2'); |
| 35 | + var ctx2 = canvas2.getContext('2d'); |
| 36 | + ctx2.font = '25px serif'; |
| 37 | + ctx2.fillText('今骨直', 60, 30); |
| 38 | + |
| 39 | + var canvas3 = document.getElementById('canvas3'); |
| 40 | + var ctx3 = canvas3.getContext('2d'); |
| 41 | + ctx3.font = '25px serif'; |
| 42 | + ctx3.fillText('今骨直', 60, 30); |
| 43 | + |
| 44 | + var canvas4 = document.getElementById('canvas4'); |
| 45 | + var ctx4 = canvas4.getContext('2d'); |
| 46 | + ctx4.font = '25px serif'; |
| 47 | + ctx4.fillText('今骨直', 60, 30); |
| 48 | + } |
| 49 | +</script> |
| 50 | +<body onload="generateReference()"> |
| 51 | + <canvas id="canvas1" lang="ja" width="300" height="50"> |
| 52 | + Browser does not support HTML5 Canvas. |
| 53 | + </canvas> |
| 54 | + <canvas id="canvas2" lang="zh-CN" width="300" height="50"> |
| 55 | + Browser does not support HTML5 Canvas. |
| 56 | + </canvas> |
| 57 | + <canvas id="canvas3" lang="ja" width="300" height="50"> |
| 58 | + Browser does not support HTML5 Canvas. |
| 59 | + </canvas> |
| 60 | + <canvas id="canvas4" lang="zh-CN" width="300" height="50"> |
| 61 | + Browser does not support HTML5 Canvas. |
| 62 | + </canvas> |
| 63 | +</body> |
0 commit comments