使用CSS爲內容設定特定的鼠標樣式(cursor)介紹

相信大家都知道我們的鼠標在網頁中不同的元素中有不同的顯示(例如 a 元素就顯示爲「箭頭指針」),但是其實我們還可以自定義這些有趣的東西哦!今天「暢想資源」就來教大家如何使用CSS爲內容設定特定的鼠標樣式(cursor),讓你的網頁更加的生動、活潑!

教學

以下的表格顯示了英语网站导航的每一種樣式相應的CSS代碼,而只需將鼠標移動到對應的框格內就可以預覽效果啦!(各種系統、瀏覽器下的效果可能有所區別!) :mrgreen:

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;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值