Sign in

Where is the mouse cursor? It is the coordinate position when clicking: the cursor attribute of CSS

mevtg edited in Fri, 08 Jul 2022

Using the cursor of CSS, you can change the cursor shape of the mouse,

  1. After setting to pointer, the click position is the upper left corner of the cursor
  2. After setting to crosshair, the click position is the center of the cursor
  3. Now there is a requirement to change the cursor to a custom icon. By default, the top left corner of the icon is still used as the click position, but the current requirement is to use the lower center of the icon as the click position

According to 1 and 2, you can see that you can customize the position of the icon as the real click position, but how can this customization be realized through CSS? If it can't be realized through CSS, is there any other way

1 Replies
commented on Fri, 08 Jul 2022

After looking at the implementation of Sogou map, you can set it as cursor: URL () x y

lock This question has been locked and the reply function has been disabled.