EN
CSS - change cursor on hover
0 points
In this article, we would like to show you how to change the cursor on hover in CSS.
Quick solution:
xxxxxxxxxx
1
div {
2
cursor: pointer;
3
}
In this example, we use the cursor: pointer
to change the mouse cursor within the div
element on the hover event.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
div {
7
height: 100px;
8
width: 100px;
9
color: #28a745;
10
border: 1px solid #28a745;
11
border-radius: 10px;
12
display: flex;
13
justify-content: center;
14
align-items: center;
15
16
cursor: pointer; /* <----- required */
17
}
18
19
</style>
20
</head>
21
<body>
22
<div>Hover me.</div>
23
</body>
24
</html>