Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • 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 311 Views
  • 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 Offline
    K Offline
    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 Offline
      mariusjopenM Offline
      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 Offline
        K Offline
        Karolina
        wrote on last edited by
        #3

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

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

          I am using Google Chrome, by the way.

          1 Reply Last reply
          0
          • mariusjopenM Offline
            mariusjopenM Offline
            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 Offline
              K Offline
              Karolina
              wrote on last edited by
              #6

              Ah thanks, I'll try that!

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              I also code custom websites or custom Lay features.
              💿 Email me here: 💿
              info@laytheme.com

              Before you post:
              1. When using a WordPress Cache plugin, disable it or clear your cache.
              2. Update Lay Theme and all Lay Theme Addons
              3. Disable all Plugins
              4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

              This often solves issues you might run into

              When you post:
              1. Post a link to where the problem is
              2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
              3. If the problem is difficult to explain, post screenshots / link to a video to explain it
              Online Users
              arminunruhA
              arminunruh
              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