簡體   English   中英

如何將球固定在光標上?

[英]How do I attach this ball to the cursor?

我目前正在建立一個投資組合。 我受到fubiz studio的啟發。 他們將這個非常酷的球附着在光標上。 我想知道是否有人可以解釋他們是如何做到的,並且可以給我指導如何建造它。

Fubiz工作室: http//fubiz.studio/en/selected-projects

我想這就是你想要的

.custom {
  cursor: url(images/my-cursor.png), auto;
}

https://css-tricks.com/almanac/properties/c/cursor/

嘗試將其添加到樣式表中:

cursor: url("images/cursor.png"), pointer;

正如其他人所說,通過CSS實現的最佳形式是使用類cursor如下所示:

.class{
  cursor: url(images-folder/cursor-image.png), auto;
}

另一方面,認為您有很多CSS類可用於修改和“玩”游標:

.alias {cursor: alias;}
.all-scroll {cursor: all-scroll;}
.auto {cursor: auto;}
.cell {cursor: cell;}
.context-menu {cursor: context-menu;}
.col-resize {cursor: col-resize;}
.copy {cursor: copy;}
.crosshair {cursor: crosshair;}
.default {cursor: default;}
.e-resize {cursor: e-resize;}
.ew-resize {cursor: ew-resize;}
.grab {cursor: grab;}
.grabbing {cursor: grabbing;}
.help {cursor: help;}
.move {cursor: move;}
.n-resize {cursor: n-resize;}
.ne-resize {cursor: ne-resize;}
.nesw-resize {cursor: nesw-resize;}
.ns-resize {cursor: ns-resize;}
.nw-resize {cursor: nw-resize;}
.nwse-resize {cursor: nwse-resize;}
.no-drop {cursor: no-drop;}
.none {cursor: none;}
.not-allowed {cursor: not-allowed;}
.pointer {cursor: pointer;}
.progress {cursor: progress;}
.row-resize {cursor: row-resize;}
.s-resize {cursor: s-resize;}
.se-resize {cursor: se-resize;}
.sw-resize {cursor: sw-resize;}
.text {cursor: text;}
.url {cursor: url(myBall.cur),auto;}
.w-resize {cursor: w-resize;}
.wait {cursor: wait;}
.zoom-in {cursor: zoom-in;}
.zoom-out {cursor: zoom-out;}

拖動背景的部分全部是關於使用背景圖像和css / js,最后是全部混合所有Web開發工具。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM