TOMweb Posted December 8, 2020 Posted December 8, 2020 Site URL: https://endive-denim-89ds.squarespace.com/hotel-de-syeres https://endive-denim-89ds.squarespace.com/hotel-de-syeres pw: 1404-Hello Hello, I would like to know if it's possible to resize the first section background on scroll for mobiles? The image takes 100% viewport height on page load, but it crops a lot of the picture. The user should be able to view the full picture when he/she scrolls. Can it shrink on scroll to something like 20vh? Please advise, Many thanks!
Beyondspace Posted December 8, 2020 Posted December 8, 2020 34 minutes ago, TOMweb said: Site URL: https://endive-denim-89ds.squarespace.com/hotel-de-syeres https://endive-denim-89ds.squarespace.com/hotel-de-syeres pw: 1404-Hello Hello, I would like to know if it's possible to resize the first section background on scroll for mobiles? The image takes 100% viewport height on page load, but it crops a lot of the picture. The user should be able to view the full picture when he/she scrolls. Can it shrink on scroll to something like 20vh? Please advise, Many thanks! When scroll down the header will has a .shrink class, we can take advantage of it @media only screen and (max-width: 600px) { .shrink + #page section[data-section-id="5f75a22fcd2d631e090303ff"] .section-background img { height: 50% !important; top: 20%; position: relative; } #page section[data-section-id="5f75a22fcd2d631e090303ff"] .section-background img { transition: all 0.5s; } } BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
TOMweb Posted December 8, 2020 Author Posted December 8, 2020 Thank you @bangank36! is there a way to shrink the section height as well? I have now a huge gap between the image and the next section block...
Beyondspace Posted December 9, 2020 Posted December 9, 2020 4 hours ago, TOMweb said: Thank you @bangank36! is there a way to shrink the section height as well? I have now a huge gap between the image and the next section block... .shrink + #page section[data-section-id="5f75a22fcd2d631e090303ff"] .section-background img { height: 50% !important; top: 50%; position: relative; } .shrink + #page section[data-section-id="5f75a22fcd2d631e090303ff"] { min-height: 50vh !important; } #page section[data-section-id="5f75a22fcd2d631e090303ff"] .section-background img { transition: all 0.5s; } BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
TOMweb Posted December 9, 2020 Author Posted December 9, 2020 Awesome, I can work with that!!! Thank you! 🙏 ☺️ One last thing... Is there a way to ease the transition when we scroll back up? It just "pops" bigger now.
TOMweb Posted December 9, 2020 Author Posted December 9, 2020 @bangank36 Any idea how to smoothly de-shrink this section when we scroll back up? Many thanks for your help.
Beyondspace Posted December 9, 2020 Posted December 9, 2020 4 hours ago, TOMweb said: @bangank36 Any idea how to smoothly de-shrink this section when we scroll back up? Many thanks for your help. I have no idea, sorry BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> 🤖 Ask me anything
TOMweb Posted December 9, 2020 Author Posted December 9, 2020 Okay, thank you so much for your help so far, it worked so well!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.