Discussions » Creation Requests

How to follow your mouse cursor?

§
Posted: 2019-03-04

How to follow your mouse cursor?

Hello, could somebody show me how to make a simple script that something will follow a mouse cursor.. For example a text/black box/picture/anything will just follow/stick to your mouse cursor using tampermonkey/greasemonkey scripting..

§
Posted: 2019-03-05
Edited: 2019-03-05

The full code is:

<!DOCTYPE html>

Follow Mouse!

<style>
    body {
        min-width: 100%;
        min-height: 100%;
    }
    #moveItem {
        width: 75px;
        height: 75px;
        background-color: #FF3333;
        position: absolute;
        border-radius: 50%;
    }
</style>

Post reply

Sign in to post a reply.