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

New Customer Cursor (Hover state)

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 903 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
    K
    KingJut
    wrote on 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
    • RichardR
      RichardR
      Richard
      Global Moderator
      wrote on 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
      0
      • RichardR Richard

        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
        K
        KingJut
        wrote on 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
        • RichardR
          RichardR
          Richard
          Global Moderator
          wrote on 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

          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
          A
          Anna_S
          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