Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change mouse pointer on click

I'm currently working on a project that involves elements where a custom mouse pointer will be used. The code that I'm using for that function is simple just:

.hand {
    cursor:url(/images/cursor1.gif);
}

Now to my question: - I was just wondering (as the title says) if there are anyway that I can make the cursor change to cursor2.gif when you click inside the div-class "hand" (?).

like image 272
QAW Avatar asked Mar 28 '13 22:03

QAW


People also ask

How do I change my mouse from 1 click to 2?

Right-click the “Start” button and select “Control Panel“. Select “Appearance and Personalization“. Choose “Specify single- or double-click to open“. In the “Click items as follows” section, choose between “Single click to open an item” or “Double-click to open an item“.

How do I change my click key?

Open the Control Panel. In the Control Panel, double-click the Mouse icon. In the Mouse Properties window, click the Buttons tab and select the action for each of the buttons.


1 Answers

Use the :active psuedo-class:

.hand:active {
    cursor: url('/imgages/cursor1.gif');
}
like image 196
Blender Avatar answered Sep 23 '22 10:09

Blender