Hi dear welcome to "CodePrime" Blog . In this post we are going to learn How To Use CSS Cursor and Custom Cursor Property. First Creat A index.html file Copy This HTML CODE and pest it one your code editor. 2ndly creat style.css file Then Copy The CSS CODE and pest it then open the index.html file with your browser.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSS Cursure | By Code Prime </title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Vero atque soluta id? Odit eius amet voluptatem nostrum accusamus iusto, error cumque mollitia neque quis voluptate perferendis hic magnam qui sequi?
</div>
<div class="crab"><img src="https://play-lh.googleusercontent.com/kKFx6l-gSyusBb6MBV5DAdZrMBmTM31ns_2LhfkCsiwbbIYIWCxkc_2a5Nr75_hjvA" alt=""></div>
</body>
</html>
CSS
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
flex-direction: column;
cursor: url( https://blogger.googleusercontent.com/img/a/AVvXsEhaciJbPiFispmMcms_FOztUUSThdVHqgExCGvuZ0drn3bI0kncyILWwnX2HNSXQ6s42FPwc-ekC18fnkE5E-Y_MRcjPsPULXzAvhYwdg0OAvqyfMUErWSI3bHoc0CpZ_KKnao-LYhYCEMQKpwssMXSVOxSqEtVtjM2re4HjKl8TRNrVsynyhgvIGp7bQ ), pointer;
}
.container{
padding: 10px;
border-radius: 5px;
box-shadow: 0 0 4px #ccc;
font-size: 2rem;
width: 500px;
margin: 100px 0;
background: #111;
color: #fff;
cursor:copy;
}
.crab {
padding: 5px;
box-shadow: 0 0 4px #ccc;
border-radius: 5px;
}
.crab img{
width: 500px;
cursor: url( https://blogger.googleusercontent.com/img/a/AVvXsEhaciJbPiFispmMcms_FOztUUSThdVHqgExCGvuZ0drn3bI0kncyILWwnX2HNSXQ6s42FPwc-ekC18fnkE5E-Y_MRcjPsPULXzAvhYwdg0OAvqyfMUErWSI3bHoc0CpZ_KKnao-LYhYCEMQKpwssMXSVOxSqEtVtjM2re4HjKl8TRNrVsynyhgvIGp7bQ), pointer;
}
0 Comments