<section id="tires-1">
<div class="container"></div>
</section>
<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="../../js/components/tires-1.js"></script>
<section id="tires-1">
<div class="container"></div>
</section>
<script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js@3.0/dist/svg.min.js"></script>
<script src="{{ path '/js/components/tires-1.js' }}"></script>
/* No context defined. */
(function () {
document.addEventListener('DOMContentLoaded', function () {
console.log("tires-1 active");
const draw = SVG().addTo('#tires-1 .container').size(400, 300);
const rect = draw.rect(100, 100).attr({ fill: '#C873FF' });
const rect2 = draw.rect(100, 100).move(100, 100).attr({ fill: '#FF5B99' });
const rect3 = draw.rect(100, 100).move(200, 200).attr({ fill: '#609CFF' });
});
})();
#tires-1 {
padding: 1rem;
.container {
width: 100%;
height: calc(100vh - 2rem);
}
svg {
border: 1px solid teal;
width: 100%;
height: auto;
}
}
No notes defined.