【问题标题】:Url cursor in a button按钮中的 URL 光标
【发布时间】:2015-10-23 09:57:58
【问题描述】:

我有一个光标 url,我想在光标位于按钮上时更改光标,我尝试过指针、悬停、url,但它不起作用有人能帮我吗? 谢谢。

<button id="btt" style="cursor:hover" type="button">

我的网址:

<style type="text/css">
    body, a:hover {
        cursor: url(http://cur.cursors-4u.net/games/gam-14/gam1379.ani), url(http://cur.cursors-4u.net/games/gam-14/gam1379.png), progress !important;
    }
</style>

【问题讨论】:

    标签: javascript html css mouse-cursor


    【解决方案1】:

    您的代码将光标图像应用于&lt;a&gt; 元素而不是按钮。

    a:hover, button {
      cursor: url(http://cur.cursors-4u.net/games/gam-14/gam1379.ani), 
              url(http://cur.cursors-4u.net/games/gam-14/gam1379.png), 
              progress !important;
    }
    

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

    【讨论】:

    • 黄金!但是有一个问题,为什么要使用进度?
    • 我的猜测是因为 OP 使用了它。
    猜你喜欢
    • 1970-01-01
    • 2022-06-27
    • 2018-11-22
    • 1970-01-01
    • 2012-05-03
    • 1970-01-01
    • 2015-08-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多