OLD | NEW |
---|---|
1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
2 <head> | 2 <head> |
3 <title>Pepper GPU Demo</title> | 3 <title>Pepper GPU Demo</title> |
4 <style> | |
5 #container | |
6 { | |
7 margin: auto; | |
8 padding: 0px; | |
9 width: 90%; | |
10 height: 90%; | |
11 border-style: solid; | |
12 } | |
13 #plugin | |
14 { | |
15 margin: 0; | |
16 border: 0; | |
17 } | |
18 </style> | |
19 | |
20 <script type="text/javascript"> | |
21 var container; | |
22 var plugin; | |
23 | |
24 function resizePlugin() { | |
25 plugin.width = container.clientWidth; | |
26 plugin.height = container.clientHeight; | |
27 }; | |
28 | |
29 function init() { | |
30 container = document.getElementById('container'); | |
31 plugin = document.getElementById('plugin'); | |
32 | |
33 window.onresize = resizePlugin; | |
34 resizePlugin(); | |
piman
2011/07/28 22:09:24
Why is this logic needed ? Setting the plugin's wi
alokp
2011/07/28 22:28:45
I tried 100% initially, but the plugin was still o
| |
35 } | |
36 </script> | |
4 </head> | 37 </head> |
5 | 38 |
6 <body style="background-color:Silver; -webkit-perspective: 1000;"> | 39 <body onload="init();"> |
7 | 40 <div id="container"> |
8 <h1>Pepper GPU Demo</h1> | 41 <embed id="plugin" type="pepper-application/x-gpu-demo" /> |
9 <embed id="plugin" type="pepper-application/x-gpu-demo" width="512" height="512" style="position:absolute; top: 30px; -webkit-transform: rotateY(30deg);" /> | 42 </div> |
10 <p style="position:absolute; top: 256px;">Text on top</p> | |
11 </body> | 43 </body> |
12 </html> | 44 </html> |
OLD | NEW |