发表于: sitebuild | 作者: | 日期: 2009/4/23 09:04

CSS cursor用来设置指针(光标)的类型。cursor的属性值可以是多个,其间用逗号分隔。假如第一个值无法被客户端浏览器识别或所指定的光标文件无法找到及显示,则第二个值将被尝试使用。依此类推。假如全部值都不可用的话,则此属性不会发生作用。光标不会被改变。

语法如下:
Object.style.cursor=cursortype

CSS中的写法示例:
sursor: default;
cursor: url(images/cat.cur),auto;

其他说明:
FF支持jpg、gif、cur等文件,不支持ani,IE则只支持cur、ani。

cursor的属性值列表:

十字准星 cursor:crosshair
cursor:hand 或者 cursor:pointer
十字准星 cursor:crosshair
等待/沙漏 cursor:wait;
帮助 cursor:help;
无法释放 cursor:no-drop;
文字/编辑 cursor:text;
可移动对象 cursor:move;
向上改变大小 cursor:n-resize;
向下改变大小 cursor:s-resize;
向左改变大小 cursor:w-resize;
向右改变大小 cursor:e-resize;
向上左改变大小 cursor:nw-resize;
向上右改变大小 cursor:ne-resize;
向下左改变大小 sw-resize;
向下右改变大小 cursor:se-resize;
自动 cursor:auto;
禁止 cursor:not-allowed;
处理中 cursor:progress;
系统默认 cursor:default;
用户自定义 cursor:url(‘#’);#=光标文件地址(注意文件格式必须为.cur或.ani)。

参考链接:
http://www.w3school.com.cn/htmldom/prop_style_cursor.asp

: https://blog.darkmi.com/2009/04/23/852.html

本文相关评论 - 1条评论都没有呢
Post a comment now » 本文目前不可评论

No comments yet.

Sorry, the comment form is closed at this time.