Add SVG support using WebView2 in ImageViewer

It's still an experimental function
This commit is contained in:
ema
2025-06-30 05:45:21 +08:00
parent 21071a62d1
commit 98dd96283d
4 changed files with 308 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<title>SVG Preview</title>
<style>
html, body {
margin: 0;
height: 100%;
overflow: hidden;
}
#svgContainer {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
#svgWrapper {
transform-origin: center center;
transition: transform 0.05s ease-out;
cursor: grab;
}
</style>
</head>
<body>
<div id="svgContainer">
<div id="svgWrapper"></div>
</div>
<script src="svg2html.js"></script>
</body>
</html>