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:
div {
cursor: pointer;
}
Practical example
In this example, we use the cursor: pointer
to change the mouse cursor within the div
element on the hover event.
// ONLINE-RUNNER:browser;
<!doctype html>
<html>
<head>
<style>
div {
height: 100px;
width: 100px;
color: #28a745;
border: 1px solid #28a745;
border-radius: 10px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer; /* <----- required */
}
</style>
</head>
<body>
<div>Hover me.</div>
</body>
</html>