Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. CSS Custom Cursor Issue

CSS Custom Cursor Issue

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    K
    Karolina
    wrote on last edited by
    #1

    Hey everybody,
    on my website I want to use a custom cursor (small illustration) and another custom one for the mouseover effect. The problem is, if I use .png (1x and 2x for retina), the cursor image is sharp but I am unable to set the hotspot coordinates to the center. No matter what coordinates I type in, the center stays in the top left corner of the cursor and it sort of "jumps" everytime it hovers over a link.

    body {
    cursor: url(http://test.de/image1.png) 35 35, auto;
    cursor: -webkit-image-set
            (url(http://test.de/image1.png) 1x,
             url(http://test.de/image1.png) 2x ), auto;
    }
    
    a {
    cursor: url(http://test.de/image2.png) 30 30, auto !important;
    cursor: -webkit-image-set
            (url(http://test.de/image2.png) 1x,
             url(http://test.de/image2.png) 2x ), auto !important;
    }
    

    If I use .svg, the hotspot coordinates are in the center but the cursor image appears blurry although the .svg contains fixed width and height (not responsive).

    body {
    cursor: url(http://test.de/image1.svg) 35 35, auto;
    }
    
    a {
    cursor: url(http://test.de/image2.svg) 30 30, auto !important;
    }
    

    Does anyone know how to fix this?

    1 Reply Last reply
    0
    • mariusjopenM
      mariusjopenM
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Dear @Karolina
      can you post a link?

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • K
        K
        Karolina
        wrote on last edited by
        #3

        Hi @mariusjopen
        Sure, here you go http://test.girlpunk.de/
        Thanks!

        1 Reply Last reply
        0
        • K
          K
          Karolina
          wrote on last edited by
          #4

          I am using Google Chrome, by the way.

          1 Reply Last reply
          0
          • mariusjopenM
            mariusjopenM
            mariusjopen
            Global Moderator
            wrote on last edited by
            #5

            Dear @Karolina
            in my Chrome it works.

            Mhm…
            Yes, nothing we can do about the retina.

            Otherwise use a jQuery which makes an image to follow your cursor.

            Best!

            Marius

            www.mariusjopen.world

            1 Reply Last reply
            0
            • K
              K
              Karolina
              wrote on last edited by
              #6

              Ah thanks, I'll try that!

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Online Users
              L
              lstark
              G
              gd_mrsn
              V
              vinc_studio
              Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
              laytheme.com
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Search