Solution 1 :

Below the CSS for my default cursor overrides I always use. I added your cursor as an example (can’t test if it works, though), modify them to your needs as required.

/*****************************/
/* Global cursor preferences */
/*****************************/
body  { cursor: default; cursor: url('../images/cursor3.png'), auto }
input { cursor: auto    } /* Use a custom cursor, except on: */

input[list="datalist"],
input[type="button"  ],
input[type="checkbox"],
input[type="radio"   ],
input[type="color"   ],
input[type="range"   ],
input[type="reset"   ],
input[type="file"    ],
input[type="submit"  ],
label:not([for=""]),
a,button,select,keygen   { cursor: pointer } 
[contenteditable="true"] { cursor: text    }

Solution 2 :

You can use universal selector * to make it work on every :hover element (obviously you will need to just change url for yours):

body *:hover{
  cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png'), auto;
}
body:active *:hover{
  cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/sad.png'), auto;
}

DEMO (just click to see the active)

body {
    height: 100vh;
    cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png'), auto;
    background-image: url('https://cdn.pixabay.com/photo/2020/01/14/10/55/cartoon-4764725_960_720.png');
}

body:active {
    height: 100vh;
    cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/sad.png'), auto;
}
.title {
    font-family: 'Gloria Hallelujah', cursive;
    position: absolute;
    top: 2%;
    left: 41%;
    text-align: center;
    color: yellow;
    text-shadow: -1px 3px 3px black;
    animation-name: eat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 2.5s;
}
@keyframes eat{
    0% { transform: scale(1);
    }
    50% { transform: scale(2);
    }
    100% { transform: scale(1);
    }
}
.micro
{
    position: absolute;
    top: 61.7%;
    left: 11.8%;
    transform: rotate(-14deg);
    font-size: 50%;
    font-family: Arial, Helvetica, sans-serif;
    color: red;
    animation-name: micro;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 1s;
}
@keyframes micro{
    0% {opacity: 0%;}
    50% {opacity: 100%;}
    100% {opacity: 0%;}
}

.run {
    width: 5%;
    top: 45%;
    left: 41%;
    position: absolute;
    animation-name: run;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 3s;
}
@keyframes run {
    0% {transform: translateX(0px); transform: rotateX(0px)}
    50% {transform: translateX(120px); transform: rotateY(0px);}
    75% {transform: translateX(80px); transform: rotateY(180deg);}
    100% {transform: translateX(0px);}
}
.kitchen {
    position: absolute; 
    top: 28px;
    left: 80px; 
    height: 90%;
    width: 90%;
}

.lightbox {
    position: absolute;
    top: 28px;
    left: 80px;
    height: 90%;
    width: 90%;
    animation-name: glow;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
@keyframes glow{
    0% {opacity: 0%;}
    50% {opacity: 50%;}
    100% {opacity: 0%;}
}

input[type="radio"] {
    display: none;
    counter-increment: unchecked-sum;

}
input[type="radio"]:checked + label {
  display: none;
  counter-increment: checked-sum;
}
.images {
    position: absolute; 
    left: 0; 
    top: 0;
    z-index: 1;
}
.do1 {
    top: 67%;
    left: 50%;
}
.do2 {
    top: 60%; 
    left: 15%;
}
.do3{
    top: 55%;
    left: 70%;
}
.do4{
    top: 23.5%;
    left: 75%;
}
.do5{
    top: 21%;
    left: 28%;
}

section img{
  max-width: 40px;
}

body *:hover{
  cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/happy.png'), auto;
}
body:active *:hover{
  cursor: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/9632/sad.png'), auto;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Eat the donuts!</title>
    <link href="https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="../css/spillside.css">
</head>
<body>
    <div class="container">
        <img src="../images/background-page2-new.png" class="kitchen" draggable="false">
        <img src="../images/homer-run.gif" class="run" draggable="false">
        <img src="../images/light.png" class="lightbox" draggable="false">
        <div class="text">
        <h1 class="title">Eat all the donuts!</h1>
        <p class="micro">ready</p>
        </div>
    </div>   
    <section>
        <div class="images do1">
            <input type="radio" id="donut1">
            <label for="donut1"><img src="https://cdn.pixabay.com/photo/2016/01/14/11/57/donut-1139832_960_720.png"></label>
        </div>
        <div class="images do2">
            <input type="radio" id="donut2">
            <label for="donut2"><img src="https://cdn.pixabay.com/photo/2016/01/14/11/57/donut-1139832_960_720.png"></label>
        </div>
        <div class="images do3">
            <input type="radio" id="donut3">
            <label for="donut3"><img src="https://cdn.pixabay.com/photo/2016/01/14/11/57/donut-1139832_960_720.png"></label>
        </div>
        <div class="images do4">
            <input type="radio" id="donut4">
            <label for="donut4"><img src="https://cdn.pixabay.com/photo/2016/01/14/11/57/donut-1139832_960_720.png"></label>
        </div>
        <div class="images do5">
            <input type="radio" id="donut5">
            <label for="donut5"><img src="https://cdn.pixabay.com/photo/2016/01/14/11/57/donut-1139832_960_720.png"></label>
        </div>
    </section>
</body>
</html>

Problem :

So I’ve got two custom mouse cursors that I’d like to keep at all times. The first cursor is a face, and the second is a face with an open mouth, it switches to the second one when the user clicks.
My problem is that when the user hovers over a certain object, like a div class, then the custom cursor disappears and it reverts to the default cursor.
How would I fix this problem?

The code for the cursor is in my CSS document.

Screenshots: https://i.imgur.com/P8ceHUo.jpeg, https://i.imgur.com/HSNLXpb.jpeg, https://i.imgur.com/VUd5BKx.jpg

body {
    height: 100vh;
    cursor: url('../images/cursor3.png'), auto;
    background-image: url(../images/backgroundDonuts.jpg);
}

body:active {
    height: 100vh;
    cursor: url('../images/cursor3-eat.png'), auto;
}
.title {
    font-family: 'Gloria Hallelujah', cursive;
    position: absolute;
    top: 2%;
    left: 41%;
    text-align: center;
    color: yellow;
    text-shadow: -1px 3px 3px black;
    animation-name: eat;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 2.5s;
}
@keyframes eat{
    0% { transform: scale(1);
    }
    50% { transform: scale(2);
    }
    100% { transform: scale(1);
    }
}
.micro
{
    position: absolute;
    top: 61.7%;
    left: 11.8%;
    transform: rotate(-14deg);
    font-size: 50%;
    font-family: Arial, Helvetica, sans-serif;
    color: red;
    animation-name: micro;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 1s;
}
@keyframes micro{
    0% {opacity: 0%;}
    50% {opacity: 100%;}
    100% {opacity: 0%;}
}

.run {
    width: 5%;
    top: 45%;
    left: 41%;
    position: absolute;
    animation-name: run;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-duration: 3s;
}
@keyframes run {
    0% {transform: translateX(0px); transform: rotateX(0px)}
    50% {transform: translateX(120px); transform: rotateY(0px);}
    75% {transform: translateX(80px); transform: rotateY(180deg);}
    100% {transform: translateX(0px);}
}
.kitchen {
    position: absolute; 
    top: 28px;
    left: 80px; 
    height: 90%;
    width: 90%;
}

.lightbox {
    position: absolute;
    top: 28px;
    left: 80px;
    height: 90%;
    width: 90%;
    animation-name: glow;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}
@keyframes glow{
    0% {opacity: 0%;}
    50% {opacity: 50%;}
    100% {opacity: 0%;}
}

input[type="radio"] {
    display: none;
    counter-increment: unchecked-sum;

}
input[type="radio"]:checked + label {
  display: none;
  counter-increment: checked-sum;
}
.images {
    position: absolute; 
    left: 0; 
    top: 0;
    z-index: 1;
}
.do1 {
    top: 67%;
    left: 50%;
}
.do2 {
    top: 60%; 
    left: 15%;
}
.do3{
    top: 55%;
    left: 70%;
}
.do4{
    top: 23.5%;
    left: 75%;
}
.do5{
    top: 21%;
    left: 28%;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Eat the donuts!</title>
    <link href="https://fonts.googleapis.com/css2?family=Gloria+Hallelujah&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="../css/spillside.css">
</head>
<body>
    <div class="container">
        <img src="../images/background-page2-new.png" class="kitchen" draggable="false">
        <img src="../images/homer-run.gif" class="run" draggable="false">
        <img src="../images/light.png" class="lightbox" draggable="false">
        <div class="text">
        <h1 class="title">Eat all the donuts!</h1>
        <p class="micro">ready</p>
        </div>
    </div>   
    <section>
        <div class="images do1">
            <input type="radio" id="donut1">
            <label for="donut1"><img src="../images/donut-final.png"></label>
        </div>
        <div class="images do2">
            <input type="radio" id="donut2">
            <label for="donut2"><img src="../images/donut-final.png"></label>
        </div>
        <div class="images do3">
            <input type="radio" id="donut3">
            <label for="donut3"><img src="../images/donut-final.png"></label>
        </div>
        <div class="images do4">
            <input type="radio" id="donut4">
            <label for="donut4"><img src="../images/donut-final.png"></label>
        </div>
        <div class="images do5">
            <input type="radio" id="donut5">
            <label for="donut5"><img src="../images/donut-final.png"></label>
        </div>
    </section>
</body>
</html>

Comments

Comment posted by Pete

if they are the only two cursors you are ever going to use, could be a case for using

By