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. logo Scroll animation

logo Scroll animation

Scheduled Pinned Locked Moved General Discussion
8 Posts 3 Posters 127 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.
  • W Offline
    W Offline
    Warul Kawa
    wrote on Sep 19, 2024, 3:02 PM last edited by
    #1

    Hi!
    I'm looking for a way replicate this simple scroll animation, where the first row is fixed, but scrolls away as the second row scrolls in:
    https://spaces.is/loversmagazine/interviews/marc-edwards

    Appreciate any help you can throw my way!

    1 Reply Last reply
    0
    • F Offline
      F Offline
      felix_rabe
      wrote on Sep 20, 2024, 9:50 AM last edited by felix_rabe Sep 20, 2024, 5:52 AM
      #2

      imagine a container that contains the headline and below the image. now you give the headline a "position: sticky; top: 0;" as a custom css. Maybe you can work with that?

      W 1 Reply Last reply Sep 23, 2024, 7:54 AM
      0
      • A Offline
        A Offline
        arminunruh
        Global Moderator
        wrote on Sep 20, 2024, 11:06 AM last edited by
        #3

        yea!

        try creating a row,
        right click the row, choose set custom row height

        enter 200vh as row height

        now put a text and image into that row.
        right click both and for both click "make sticky"

        then play around with the positioning of both elements and - right click on element → space top

        1 Reply Last reply
        0
        • F felix_rabe
          Sep 20, 2024, 9:50 AM

          imagine a container that contains the headline and below the image. now you give the headline a "position: sticky; top: 0;" as a custom css. Maybe you can work with that?

          W Offline
          W Offline
          Warul Kawa
          wrote on Sep 23, 2024, 7:54 AM last edited by
          #4

          @felix_rabe
          @arminunruh

          Thanks a lot!

          1 Reply Last reply
          0
          • W Offline
            W Offline
            Warul Kawa
            wrote on Nov 13, 2024, 3:44 PM last edited by
            #5

            @arminunruh would it also be possible to hide the menu while on that row, like on the example website?

            1 Reply Last reply
            0
            • W Offline
              W Offline
              Warul Kawa
              wrote on Nov 13, 2024, 3:47 PM last edited by Warul Kawa Nov 13, 2024, 10:48 AM
              #6

              i tried this but it's not doing the trick (introhead is the class I gave to the row)

              body[data-type="page"][data-id="19"].introhead nav {
              	display: none !important;
              }
              

              here's the website: http://beabeazleyarchitects.com

              1 Reply Last reply
              0
              • A Offline
                A Offline
                arminunruh
                Global Moderator
                wrote on Nov 16, 2024, 5:52 PM last edited by
                #7

                this wont work. the nav element would need to be a child element of the row with the class. but its not, also the .introhead needs a space before .

                i think one way to do this would be to just hide the nav for this page:

                body[data-type="page"][data-id="19"] nav {
                	display: none !important;
                }
                

                and then using javascript, show the nav again on scroll:

                <script>
                jQuery(document).on('scroll', function(){
                if(window.scrollY > window.innerHeight) {
                jQuery('nav').css('display', 'inline-block');
                } else {
                jQuery('nav').css('display', '');
                }
                })
                </script>
                

                add this to lay options → custom css & html → custom head content

                you may also need to check if you're on that specific page with javascript,
                you may also need to use the newpageshown event:
                https://laytheme.com/documentation/custom-javascript.html#newpage-events

                to check if you just arrived on this page from another page to then hide the navigation in case your scroll position is < window.scrollY

                1 Reply Last reply
                0
                • W Offline
                  W Offline
                  Warul Kawa
                  wrote on Nov 20, 2024, 1:05 PM last edited by
                  #8

                  Thank you Armin! 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
                  M
                  MWPA
                  5 minutes ago
                  O
                  okitswinter
                  25 minutes ago
                  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