I am using wix studio for my website design…I am looking for a section of code that will allow the cursor to leave a tail when dragged across a page. Something like this https://cursoreffects.com/ but with a simple gray or black pixel tail instead of a colorful/image based one.
The ideal code would allow me to easily change the tail color, length, width, and duration it stays on screen. (If this is possible?)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cursor Effects Example</title>
<!-- Include the Cursor Effects library hosted on unpkg -->
<script src="https://unpkg.com/cursor-effects@latest/dist/browser.js"></script>
<!-- Add any additional CSS styles if needed -->
<style>
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
overflow: hidden; /* to prevent scrollbars for the demo */
}
h1 {
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>Cursor Effects Example</h1>
<!-- Initialize fairyDustCursor -->
<script type="module">
import { fairyDustCursor } from "https://unpkg.com/cursor-effects@latest/dist/esm.js";
// Create a new instance of fairyDustCursor
document.addEventListener('DOMContentLoaded', function() {
new fairyDustCursor();
});
</script>
</body>
</html>
Just a simple example, where you will have your wished effect on the top-area of the window. This would be the HTML-Component-Way → HTML-Components woks only 50% on free sites. That means —> it would work, but communication between iFrame and page would not be possible, as of my knowledge.
Okay I see this working on my site…but what do I need to do to change the effect/dust color? and how do I make the effect happen across the entire iframe area instead of just on top of the text?