📜  如何使用 CSS 设置指示任何方向滚动的光标样式?

📅  最后修改于: 2021-08-30 13:11:58             🧑  作者: Mango

在本文中,我们将看到如何使用 CSS 为任何方向设置光标样式。可以使用全滚动光标属性创建此样式。此属性将光标设置为使用 CSS 指示任何方向滚动。 all-scroll属性值表示可以向任何方向滚动。

句法:

cursor: all-scroll;

示例 1:

HTML


  

    

  

    

        Welcome to GeeksforGeeks     

       

        Mouse over here to change the         mouse cursor.     

  


HTML


  

    

  

    

        Welcome to GeeksforGeeks     

       

        Mouse over here to change the         mouse cursor using             all-scroll property.     

       

        Mouse over here to change the mouse         cursor using move          cursor property.     

  


输出:

示例 2:我们可以使用move属性值来设置光标样式。

HTML



  

    

  

    

        Welcome to GeeksforGeeks     

       

        Mouse over here to change the         mouse cursor using             all-scroll property.     

       

        Mouse over here to change the mouse         cursor using move          cursor property.     

  

输出:

支持的浏览器:

  • 谷歌浏览器
  • 边缘
  • 火狐浏览器
  • 歌剧
  • 苹果浏览器