Skip to content

Commit

Permalink
Locks zoom/scroll and aspect ratio.
Browse files Browse the repository at this point in the history
  • Loading branch information
BusyBird15 authored Dec 13, 2024
1 parent a48470e commit 4d2eaec
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions utility-pages/transparent-svg.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>Load SVG Image</title>
<style>
body, html {
Expand All @@ -11,19 +11,21 @@
height: 100%;
width: 100%;
background: transparent;
overflow: hidden;
overflow: hidden; /* Disable scrolling */
}
#imageContainer {
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
position: absolute;
top: 0;
left: 0;
}
img {
height: 100%;
width: 100%;
object-fit: fill; /* This will disregard the aspect ratio */
max-height: 100%;
max-width: 100%;
}
</style>
</head>
Expand Down

0 comments on commit 4d2eaec

Please sign in to comment.