|
10 | 10 | <script type="text/javascript" src="../build/jquery.plugin.html2canvas.js"></script>
|
11 | 11 | <script type="text/javascript">
|
12 | 12 | $(window).ready(function() {
|
| 13 | + var ctx = $('#testcanvas')[0].getContext('2d'); |
| 14 | + |
| 15 | + ctx.fillStyle = "rgb(200,0,0)"; |
| 16 | + ctx.fillRect (10, 10, 55, 50); |
| 17 | + |
| 18 | + ctx.fillStyle = "rgba(0, 0, 200, 0.5)"; |
| 19 | + ctx.fillRect (30, 30, 55, 50); |
| 20 | + |
13 | 21 | $('body').html2canvas();
|
14 | 22 | });
|
15 | 23 | </script>
|
|
35 | 43 |
|
36 | 44 | </head>
|
37 | 45 | <body>
|
38 |
| - |
| 46 | + |
39 | 47 | <img src="image.jpg" />
|
40 |
| - <img src="image.jpg" style="width:50px;height:400px;" /> |
41 |
| - <img src="image.jpg" style="width:500px;" /> |
42 |
| - <img src="image.jpg" style="width:500px;height:40px;" /> |
43 |
| - |
44 |
| - |
45 |
| - <img src="image.jpg" style="padding:20px;border:5px solid black;" /> |
46 |
| - |
47 |
| - <img src="image.jpg" style="padding-bottom:20px;border-top:5px solid black;clear:both;" /> |
48 |
| - |
49 |
| - |
50 |
| - <img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;" /> |
51 |
| - <img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;height:25px;" /> |
52 |
| - |
53 |
| - <img src="image.jpg" style="width:0px;height:0px;border:1px solid black" /> |
54 |
| - <img src="image.jpg" style="width:0px;height:0px;" /> |
55 |
| - |
| 48 | + <img src="image.jpg" style="width:50px;height:400px;" /> |
| 49 | + <img src="image.jpg" style="width:500px;" /> |
| 50 | + <img src="image.jpg" style="width:500px;height:40px;" /> |
| 51 | + |
| 52 | + |
| 53 | + <img src="image.jpg" style="padding:20px;border:5px solid black;" /> |
| 54 | + |
| 55 | + <img src="image.jpg" style="padding-bottom:20px;border-top:5px solid black;clear:both;" /> |
| 56 | + |
| 57 | + |
| 58 | + <img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;" /> |
| 59 | + <img src="image.jpg" style="padding-top:20px;border-top:5px solid black;clear:both;width:50px;height:25px;" /> |
| 60 | + |
| 61 | + <img src="image.jpg" style="width:0px;height:0px;border:1px solid black" /> |
| 62 | + <img src="image.jpg" style="width:0px;height:0px;" /> |
| 63 | + |
| 64 | + <canvas id="testcanvas" style="width:100px;height:100px;"></canvas> |
| 65 | + |
| 66 | + |
56 | 67 | </body>
|
57 | 68 | </html>
|
0 commit comments