index : pan-zoom | |
SVG pan/zoom library. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-20 19:34:06 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-23 10:09:51 -0700 |
commit | 2d3fc1cd22ffcc61ec178eeaf97f3a4d7cba98bf (patch) | |
tree | a072ea398ce00b68dd0e5e670b32ac5ee1a812ad /public/assets/css | |
parent | 263201d869956b94660d4efa8297e89dadbe36a8 (diff) |
Use CSS transformations instead of manipulating the viewBox
Diffstat (limited to 'public/assets/css')
-rw-r--r-- | public/assets/css/style.css | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/public/assets/css/style.css b/public/assets/css/style.css new file mode 100644 index 0000000..db47790 --- /dev/null +++ b/public/assets/css/style.css @@ -0,0 +1,40 @@ +body { + text-align: center; + max-width: 100vw; +} + +.container { + padding: 0; + max-width: 586.033px; + max-height: 586.033px; + margin: 0 auto; + overflow: hidden; + border: 1px solid steelblue; + background-color: gray; +} + +img, object { + touch-action: none; +} + +img { + max-width: 100%; + border: 1px solid silver; + transform: scale(0.9); +} + +.container object, .container.switch img { + display: block; +} + +.container img, .container.switch object { + display: none; +} + +button .button-text.raster, button.switch .button-text.svg { + display: none; +} + +button.switch .button-text.raster { + display: inline; +} |