The cursor
harta dalam kawalan CSS apa kursor tetikus akan kelihatan seperti apabila ia terletak lebih elemen di mana harta ini ditetapkan. Jelas, ia hanya relevan dalam penyemak imbas / sistem operasi di mana terdapat tetikus dan kursor. Mereka digunakan pada dasarnya untuk UX untuk menyampaikan idea fungsi tertentu. Oleh itu, cubalah untuk tidak melepaskan wang itu.
Terdapat sebilangan besar dari mereka:
.auto ( cursor: auto; ) .default ( cursor: default; ) .none ( cursor: none; ) .context-menu ( cursor: context-menu; ) .help ( cursor: help; ) .pointer ( cursor: pointer; ) .progress ( cursor: progress; ) .wait ( cursor: wait; ) .cell ( cursor: cell; ) .crosshair ( cursor: crosshair; ) .text ( cursor: text; ) .vertical-text ( cursor: vertical-text; ) .alias ( cursor: alias; ) .copy ( cursor: copy; ) .move ( cursor: move; ) .no-drop ( cursor: no-drop; ) .not-allowed ( cursor: not-allowed; ) .all-scroll ( cursor: all-scroll; ) .col-resize ( cursor: col-resize; ) .row-resize ( cursor: row-resize; ) .n-resize ( cursor: n-resize; ) .e-resize ( cursor: e-resize; ) .s-resize ( cursor: s-resize; ) .w-resize ( cursor: w-resize; ) .ns-resize ( cursor: ns-resize; ) .ew-resize ( cursor: ew-resize; ) .ne-resize ( cursor: ne-resize; ) .nw-resize ( cursor: nw-resize; ) .se-resize ( cursor: se-resize; ) .sw-resize ( cursor: sw-resize; ) .nesw-resize ( cursor: nesw-resize; ) .nwse-resize ( cursor: nwse-resize; )
Kursor juga boleh menjadi gambar:
.custom ( cursor: url(images/my-cursor.png.webp), auto; )
Beberapa kursor WebKit hanya:
-webkit-zoom-in -webkit-zoom-out -webkit-zoom-grab -webkit-zoom-grabbing
Maklumat lanjut
- Modul Antara Muka Pengguna Asas CSS Tahap 3
- Dokumen Mozilla
Sokongan penyemak imbas
Data sokongan penyemak imbas ini berasal dari Caniuse, yang mempunyai lebih terperinci. Nombor menunjukkan bahawa penyemak imbas menyokong ciri pada versi dan ke atas.
Desktop
Chrome | Firefox | IE | Hujung | Safari |
---|---|---|---|---|
5 | 4 | 9 | 14 | 5 |
Mudah Alih / Tablet
Android Chrome | Android Firefox | Android | Safari iOS |
---|---|---|---|
88 | Tidak | 81 | Tidak |
Dan untuk nilai yang lebih baru, seperti zoom-in
dan zoom-out
:
Data sokongan penyemak imbas ini berasal dari Caniuse, yang mempunyai lebih terperinci. Nombor menunjukkan bahawa penyemak imbas menyokong ciri pada versi dan ke atas.
Desktop
Chrome | Firefox | IE | Hujung | Safari |
---|---|---|---|---|
4 * | 2 * | Tidak | 12 | 3.1 * |
Mudah Alih / Tablet
Android Chrome | Android Firefox | Android | Safari iOS |
---|---|---|---|
88 | Tidak | 81 | Tidak |