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. New Customer Cursor (Hover state)

New Customer Cursor (Hover state)

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 288 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
    KingJut
    wrote on May 24, 2022, 2:06 PM last edited by
    #1

    The new Custom Cursor is a great addition to Lay Theme, but I can't seem to find an option to change the cursor when in a hover state.

    Any tips, or ideas on how this part works?

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Richard
      Global Moderator
      wrote on May 25, 2022, 11:38 PM last edited by
      #2

      Dear @KingJut

      Technically the cursor is always hovering, and the 'hoverstate' is applied to what it hovers over. What where you thinking of it hovering over ? E.g a Link, An image etc 🌝


      Best
      Richard
      K 1 Reply Last reply May 26, 2022, 7:27 AM
      0
      • R Richard
        May 25, 2022, 11:38 PM

        Dear @KingJut

        Technically the cursor is always hovering, and the 'hoverstate' is applied to what it hovers over. What where you thinking of it hovering over ? E.g a Link, An image etc 🌝


        Best
        Richard
        K Offline
        K Offline
        KingJut
        wrote on May 26, 2022, 7:27 AM last edited by
        #3

        Hi @Richard and thanks for your reply.

        That's correct, I have images that are links on my demo site and there is no interaction with the cursor to highlight these as clickable.

        I did have some custom CSS where I tweaked the two different states:

        
          body {
                cursor: url(http://v04.347.myftpupload.com/wp-content/uploads/2022/03/Cursor_nonhover.png) 64 64, auto;
            }
        
            a {
                cursor: url(http://v04.347.myftpupload.com/wp-content/uploads/2022/03/Cursor-1.png) 64 64, auto !important;
            }
        

        Which loaded a different (larger) cursor image to make it obvious there was an interaction — it's a bit clunky, as in it just flicks to the image, but I've seen sites where the cursor gently grows and shrinks, like rolls-royce website cursor.

        How can this be done with the new cursor in Lay Theme?

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Richard
          Global Moderator
          wrote on May 26, 2022, 10:09 PM last edited by
          #4

          Dear @KingJut

          Lay Theme uses the normal cursor like you have applied with the code above; cursor: url("source");

          The Rolls Royce website uses a trick that has become widespread now. It's actually a div or html element that has javascript applied to it to mimic the cursor ( x and y axis position on screen ).

          Within the code the native cursor has been removed:
          Screen Shot 2022-05-27 at 9.51.15 AM.png

          Normally when taking a screenshot the cursor would not be captured, this also helps us know its an HTML element:
          Screen Shot 2022-05-27 at 9.51.08 AM.png

          The Rolls Royce Cursor CSS:

          .rrmc-cursor {
          display: block;
              top: 0px;
              transform: translate3d(688px, 323px, 0px);
              position: absolute;
              width: 46px;
              height: 46px;
              top: 0;
              left: 0;
              z-index: 6000;
              pointer-events: none;
              display: none;
              mix-blend-mode: difference;
          

          It's using transform: translate3d('value'); but you could also use the CSS 'scale' or 'zoom' properties.

          These links may help you add scaling or zoom to the default cursor but the problem lies with transitioning between the two. An interesting mention in one of these links is to use a gif to mimic the effect:

          https://stackoverflow.com/questions/38767322/css-cursor-transition

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

          https://stackoverflow.com/questions/33715491/how-to-reduce-the-size-of-image-with-cursor-url

          https://www.digitalocean.com/community/tutorials/css-cursor-property

          And this is a custom HTML cursor

          https://www.freecodecamp.org/news/how-to-make-a-custom-mouse-cursor-with-css-and-javascript/


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

          1/4

          May 24, 2022, 2:06 PM


          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
          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.
          1 out of 4
          • First post
            1/4
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search