/    Sign up×
Community /Pin to ProfileBookmark

custom cursor on click.

hi, i have already got a custom cursor, and another custom cursor over links. i intend to have two more custom cursors, one for click anywhere on the screen, and one for a click on a link. i want the cursor to change back to the original one once the left mouse button is released. i cant do it! ive been at it all day.

if anyone could help that would be fantastic. i have pasted the code i have written for the custom cursors up until now.

thanks!


____________________________________________

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>
<html xmlns=”http://www.w3.org/1999/xhtml“>
<head>

<style>
<!–
BODY{
cursor:url(“lime.cur”);s
background-color: #F7FFE1;
margin-top: 0px;
margin-bottom: 0px;
}
a:link {
color: #7ECE17;
cursor:url(“lime2.cur”);
}
a:visited {
color: #7ECE17;
cursor:url(“lime2.cur”);
}
a:hover {
color: #588D10;
cursor:url(“lime2.cur”);
}
a:active {
color: #7ECE17;
cursor:url(“lime2.cur”);
}

–>
</style>

<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>SML</title>
</head>

<body>
</body>
</html>

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@ray326Jul 01.2007 — That would be the :active selector.
Copy linkTweet thisAlerts:
@WebJoelJul 01.2007 — <!--

BODY{

cursor:url("lime.cur");[SIZE="4"][COLOR="Red"]s[/COLOR][/SIZE]

background-color: #F7FFE1;

margin-top: 0px;

margin-bottom: 0px;

}[/QUOTE]
is this a [COLOR="Red"]typo[/COLOR]? If so, it needs to not be there.
Copy linkTweet thisAlerts:
@supasyeauthorJul 02.2007 — sorry i dnt know how that got there..

anyway, sorry im a bit retarded when it comes to programming..

so this :active selector.

would it be something like:


a:active selector {

color: #7ECE17;

cursor:url("lime2.cur");

}


no i just tested it and it didnt work..... :/



??
Copy linkTweet thisAlerts:
@ray326Jul 02.2007 — No, it's just [B]a:active[/B], which indicates the mouse button is depressed on an anchor. Your styles above make no difference in presentation for anything but :hover.
Copy linkTweet thisAlerts:
@supasyeauthorJul 02.2007 — i see, thats worked now, sort of..

is there a way of doing it when i click anywhere on the screen..

i'll explain exactly what im trying to achieve:

my website is squishmylime.com. so i though id have it so that whenever the user clicked the lime would squish.

with the :active selector, the cursor changes and remains changed over the selected link.

if i was to go further, i was thinking of having an animated cursor, so that when the left mouse button is clicked anywhere on the screen, the animated cursor comes on, and when the animation finishes it would turn back to the original cursor.


am i wishing for too much?
Copy linkTweet thisAlerts:
@ray326Jul 03.2007 — You'd be better off doing it with Javascript mouse event handlers.
×

Success!

Help @supasye spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.5,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...