I am new to html and css. Currently I have a checkbox:
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
When I hover over the checkbox, I need a hand icon.
How can I achieve this?
Using cursor:pointer
you can achieve this
input[type="checkbox"] {
cursor: pointer;
}
<input type="checkbox" name="vehicle" value="Bike">I have a bike<br>
You use the pointer
CSS style to change the default cursor to a pointer hand.
First, add an ID or class to your checkbox.
<input id="chkBike" type="checkbox" name="vehicle" value="Bike">I have a bike<br>
And in your CSS, use the following style.
#chkBike{
cursor: pointer;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With