svelte/test/runtime/samples/attribute-url/main.svelte

7 lines
165 B

<script>
let bgImage = 'https://example.com/foo.jpg';
let color = 'red';
</script>
<div style="background-image: url('{bgImage}'); color: {color};">{color}</div>