mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
239 B
20 lines
239 B
6 years ago
|
<script>
|
||
|
let m = { x: 0, y: 0 };
|
||
|
|
||
|
function handleMousemove(event) {
|
||
|
m.x = event.clientX;
|
||
|
m.y = event.clientY;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<div>
|
||
|
The mouse position is {m.x} x {m.y}
|
||
4 years ago
|
</div>
|
||
|
|
||
|
<style>
|
||
1 year ago
|
div {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
</style>
|