
Everything about programming and development,
Snippets, tutorials, tips or discoveries,
In programming languages like PHP, Flash, HTLM, CSS, Javascript or even C++.
Want to add you're own codes ? Then send me an email.
29 Jul |
Today we'll see how to customize a web page cursor using CSS. 
Requested :
- A cursor : .cur or image ( png or gif is better because they use transparency )
- A html page with a custom css part
:
<style type='text/css'>
CSS goes here
</style>
CSS goes here
</style>
Code :
body
{
cursor: url("path/to/image.png");
}
{
cursor: url("path/to/image.png");
}
The 'cursor' property can also get a string value corresponding to a specific OS cursor.
Here is the complete list of available cursors :
- auto
- crosshair
- default
- pointer
- move
- e-resize
- ne-resize
- nw-resize
- n-resize
- se-resize
- sw-resize
- s-resize
- w-resize
- text
- wait
- help
- progress
- inherit
Example :
The box bellow uses a custom cursor :
As you can see, it's possible to define more than one cursor. In that case, if the first one can't be loaded, then the second one will be loaded, and so on.
Hope you liked this little tip,
See you for the next one
Class of the box :
.ex_CustomCursor
{
cursor : url("cursor.png"), url("cursor.cur"), pointer;
}
{
cursor : url("cursor.png"), url("cursor.cur"), pointer;
}
As you can see, it's possible to define more than one cursor. In that case, if the first one can't be loaded, then the second one will be loaded, and so on.
Hope you liked this little tip,
See you for the next one
Comments


08/05/08
kHqizV <a href="http://enylwmbfbmqe.com/">enylwmbfbmqe</a>, [url=http://wnxmqkxttfjc.com/]wnxmqkxttfjc[/url], [link=http://pqkyevchpdrp.com/]pqkyevchpdrp[/link], http://sjsthkoblqto.com/
09/03/08
Well, first, i'd suggest beginning with a user-friendly yet powerful linux distribution like Ubuntu ( see http://ubuntu.com/ )
Their community is well furnished, and there are a lot of tutorials on the forum.
PS: Next time, try to post on an article that talks about linux, or contact me by mail ;)
07/03/08
What texts would best describe how to write your own linux coding? I am sick of windows and would like to get my linux up and running, however I am not on the net much, so I don't know where to go..... please help... hahah
01/12/07
Good One :)
29/10/07
Thanks ;)
27/10/07
Nice :)