Search code examples
htmlcsscursorforumphpbb

HTML - Cursors on a website


yes I KNOW and have read topics about how to make a cursor in HTML, and I know how to do that, but today i'm asking a bit of a different question. My question is how do I make a normal cursor on the website, like the regular pointing one, and when they hover over a link display ANOTHER cursor? For instance like on this wikia, the image is green when pointing and RED when hovering?


Solution

  • while hovering the particular content u can change the background image for cursor for exmaple

    css

    a:hover {
        cursor: url('http://img4.wikia.nocookie.net/__cb20141101171405/tdp4/images/f/fd/JdHLHLi92.png'),pointer;
    }
    
    p:hover {
        cursor: url('http://img3.wikia.nocookie.net/__cb20141101171352/tdp4/images/6/6d/DcoudoUO82.png'),text;
    }
    

    for refrence

    https://plnkr.co/edit/Yj7CMxM7IbeoVoWeRtPF