Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Animated cursor support in web applications?

Do any web browsers support animated cursors?

I've been searching the web to add custom cursors to my web application. I've been finding a lot of non animated (.cur) and animated (.ani) cursors, and using the correct CSS so that my application has custom cursors! It seems that the animated cursors are not supported in the web browsers I tried and I was wondering if there is any way possible to put animated cursors into my web application.

like image 332
skcin7 Avatar asked Feb 08 '12 07:02

skcin7


People also ask

How do I get animated cursors?

To create an animated cursor use the "File/New/New Cursor..." menu item. This will open the New Cursor dialog. On the New Cursor dialog select the desired image size and bit count. Make sure that the "Animated Cursor (ANI)" radio button is selected.

When would you use a cursor pointer?

# The pointer cursor is for links Links came along with the web. To help users understand that links are different from buttons and other interactive elements, they are given the pointer cursor. This is because links open web pages or other downloadable resources without changing data like buttons are likely to do.

What is cursor in HTML?

The cursor indicates that the row can be resized vertically. s-resize. The cursor indicates that an edge of a box is to be moved down (south) se-resize. The cursor indicates that an edge of a box is to be moved down and right (south/east)


1 Answers

I managed to accomplish this using CSS keyframes, animating the source image of the cursor. It works in Chrome and Safari (though it can get a little glitchy if you've got a ton of stuff running). Good enough for my personal site!

* {
  cursor: url(frame1.png), auto;
  -webkit-animation: cursor 400ms infinite;
  animation: cursor 400ms infinite;
}

@-webkit-keyframes cursor {
  0% {cursor: url(frame1.png), auto;}
  20% {cursor: url(frame2.png), auto;}
  40% {cursor: url(frame3.png), auto;}
  60% {cursor: url(frame4.png), auto;}
  80% {cursor: url(frame5.png), auto;}
  100% {cursor: url(frame6.png), auto;}
} 

@keyframes cursor {
  0% {cursor: url(frame1.png), auto;}
  20% {cursor: url(frame2.png), auto;}
  40% {cursor: url(frame3.png), auto;}
  60% {cursor: url(frame4.png), auto;}
  80% {cursor: url(frame5.png), auto;}
  100% {cursor: url(frame6.png), auto;}
}
like image 177
Laura Avatar answered Oct 21 '22 13:10

Laura