<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>svgjs</title>
<script src="svg.js"></script>
<script>
const load = () => {
vg(document.body).$(
svg(200, 200).zoom([0, 0], 2).attrs({background:'orange'}).$(
defs().$(
rect(0, 0, 20, 20).fillStroke('orange','blue').attrs({id: 'foo'})
),
use('#foo').attrs({x: 0, y: 0}),
use('#foo').attrs({x: -20, y: -40}),
line(0, 0, 0, -100).fillStroke(null, '#000')
)
);
};
document.addEventListener("DOMContentLoaded", load);
</script>
</head>
<body>
</body>
</html>
svg, circle, rect, path, animation...and more
License
mafumafuultu/svg.js
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
svg, circle, rect, path, animation...and more
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published