相信大家都知道我們的鼠標在網頁中不同的元素中有不同的顯示(例如 a
元素就顯示爲「箭頭指針」),但是其實我們還可以自定義這些有趣的東西哦!今天「暢想資源」就來教大家如何使用CSS爲內容設定特定的鼠標樣式(cursor),讓你的網頁更加的生動、活潑!
教學
以下的表格顯示了英语网站导航的每一種樣式相應的CSS代碼,而只需將鼠標移動到對應的框格內就可以預覽效果啦!(各種系統、瀏覽器下的效果可能有所區別!)
cursor: alias; |
cursor: all-scroll; |
cursor: auto; |
cursor: cell; |
cursor: context-menu; |
cursor: col-resize; |
cursor: copy; |
cursor: crosshair; |
cursor: default; |
cursor: e-resize; |
cursor: ew-resize; |
cursor: grab; |
cursor: grabbing; |
cursor: help; |
cursor: move; |
cursor: n-resize; |
cursor: ne-resize; |
cursor: nesw-resize; |
cursor: ns-resize; |
cursor: nw-resize; |
cursor: nwse-resize; |
cursor: no-drop; |
cursor: none; |
cursor: not-allowed; |
cursor: pointer; |
cursor: progress; |
cursor: row-resize; |
cursor: s-resize; |
cursor: se-resize; |
cursor: sw-resize; |
cursor: text; |
cursor: url(http://file.arefly.com/favicon.ico), url(myBall.cur), auto; |
cursor: vertical-text; |
cursor: w-resize; |
cursor: wait; |
cursor: zoom-in; |
cursor: zoom-out; |
cursor: initial; |