Greasy Fork镜像 is available in English.

Discussions » Creation Requests

How to follow your mouse cursor?

§
Posted: 04.03.2019.

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: 05.03.2019.
Edited: 05.03.2019.

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.

长期地址
遇到问题?请前往 GitHub 提 Issues。