mirror of
https://github.com/milk-net/milk-net.github.io.git
synced 2025-04-19 17:43:42 -05:00
Update mousetest.html
This commit is contained in:
parent
af2ed32e2b
commit
a6b420f1fa
1 changed files with 45 additions and 9 deletions
|
@ -3,16 +3,52 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>test</title>
|
<title>Trailing</title>
|
||||||
<script type="module">
|
<script src="https://unpkg.com/cursor-effects@latest/dist/browser.js"></script>
|
||||||
import { fairyDustCursor } from "https://unpkg.com/cursor-effects@latest/dist/esm.js";
|
<style>
|
||||||
|
/* Trailing effect customization */
|
||||||
|
.cursor-trailing {
|
||||||
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
|
background-color: rgba(0, 0, 0, 0.2); /* Customize the background color */
|
||||||
|
width: 20px; /* Adjust size */
|
||||||
|
height: 20px; /* Adjust size */
|
||||||
|
border-radius: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
animation: cursor-trailing-animation 0.3s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes cursor-trailing-animation {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<h1>site</h1>
|
||||||
|
<p>trailing effect</p>
|
||||||
|
|
||||||
new fairyDustCursor();
|
|
||||||
</script>
|
|
||||||
<script>
|
<script>
|
||||||
window.addEventListener("load", (event) => {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
new cursoreffects.ghostCursor();
|
new CursorEffect({
|
||||||
</script>
|
type: 'trailing', // Set the effect type to "trailing"
|
||||||
|
cursor: {
|
||||||
|
size: 12, // Set the size of the main cursor
|
||||||
|
color: 'rgba(255, 0, 0, 0.5)', // Customize the cursor color
|
||||||
|
},
|
||||||
|
trailing: {
|
||||||
|
size: 15, // Set the size of the trailing effect
|
||||||
|
distance: 50, // Set the distance the trail lags behind the main cursor
|
||||||
|
color: 'rgba(0, 255, 0, 0.5)', // Customize the trailing color
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Add table
Reference in a new issue