diff options
Diffstat (limited to 'hsm-web/Html')
| -rw-r--r-- | hsm-web/Html/index.html | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/hsm-web/Html/index.html b/hsm-web/Html/index.html index 030e8e5..814f6e7 100644 --- a/hsm-web/Html/index.html +++ b/hsm-web/Html/index.html @@ -5,16 +5,15 @@ <meta charset="utf-8"/> </head> <body> - <h2>HsMouse Monitor</h2> - <img id="my_img"></img> + <img id="cam_view" /> </body> <script> - function updateImg() { + updateImg = () => { fetch("cam.png") .then(response => response.blob()) .then(function(myBlob){ - URL.revokeObjectURL(my_img.src) - my_img.src = URL.createObjectURL(myBlob) + URL.revokeObjectURL(cam_view.src) + cam_view.src = URL.createObjectURL(myBlob) updateImg() }) } @@ -25,10 +24,19 @@ background-color: #002b36; color: #586e75; font-family: monospace; + height: 100%; + margin: 0; + position: relative; } - img { + #cam_view { + left: 50%; + margin: auto; + max-height: calc(100% - 20px); + max-width: calc(100% - 20px); outline: 2px solid #586e75; - width: 100%; + position: absolute; + top: 10px; + transform: translate(-50%, 0); } </style> </html> |
