CSS cursor
跳到导航
跳到搜索
cursor CSS 属性设置光标的类型(如果有),在鼠标指针悬停在元素上时显示相应样式。
语法
/* 关键字值 */
cursor: pointer;
cursor: auto;
/* 使用 URL,并提供一个关键字值作为备用 */
cursor: url(hand.cur), pointer;
/* URL 和 xy 的坐标偏移值,最后提供一个关键字值作为备用 */
cursor:
url(cursor1.png) 4 12,
auto;
cursor:
url(cursor2.png) 2 2,
pointer;
/* 全局属性 */
cursor: inherit;
cursor: initial;
cursor: unset;
语法形式
cursor = [ [ <url> | <url-set> ] [ <x> <y> ]? ]#? [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | grab | grabbing | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out ] <url> = <url()> | <src()> <x> = x <y> = y <url()> = url( <string> <url-modifier>* ) | <url-token> <src()> = src( <string> <url-modifier>* )