joshuaechevarriadop Posted November 30, 2022 Posted November 30, 2022 (edited) Hey all trying to create an effect where hovering over one block affects the action of a different block I managed to do it in w3 try it using html with images assigned as parent/child but as soon as I try to do the same exact thing with direct blocks, I have an issue and im not sure how to resolve it. Let me know if you can spot anything that I may be doing wrong. I've inserted my w3 code as well at the bottom Here is the site https://blueberry-carrot-xawg.squarespace.com/selected PW codeblock #block-yui_3_17_2_1_1669839743068_49521 { width:100%; } #block-yui_3_17_2_1_1669786934605_193853 { width: 100%; height: 100%; opacity:0; transition: opacity .5s ease; } #block-yui_3_17_2_1_1669839743068_49521:hover #block-yui_3_17_2_1_1669786934605_193853 { opacity: 1 !important; transition: 1s; } w3 try it code <html> <head> <style> body { text-align: center; } .parent { width: 600px; height: 200px; } .child { width: 100%; height: 100%; background-color:rgba(255, 255, 255, 0); } .parent:hover .child { opacity: 1 !important; transition: 1s !important; } .child { border: none; padding: 50px 160px; margin-top: 50px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; opacity:0; transition: opacity .5s ease; } </style> </head> <body> <div class="parent"><img src="https://i.ibb.co/tKPzwMB/clapper-closed.png" alt="" /> <button class="child"><img src="https://i.ibb.co/Xb8SRs1/closed.png" alt="" /> </button> </div> </body> </html> Edited December 1, 2022 by joshuaechevarriadop
Beyondspace Posted December 1, 2022 Posted December 1, 2022 16 hours ago, joshuaechevarriadop said: Hey all trying to create an effect where hovering over one block affects the action of a different block I managed to do it in w3 try it using html with images assigned as parent/child but as soon as I try to do the same exact thing with direct blocks, I have an issue and im not sure how to resolve it. Let me know if you can spot anything that I may be doing wrong. I've inserted my w3 code as well at the bottom Here is the site https://blueberry-carrot-xawg.squarespace.com/selected PW codeblock #block-yui_3_17_2_1_1669839743068_49521 { width:100%; } #block-yui_3_17_2_1_1669786934605_193853 { width: 100%; height: 100%; opacity:0; transition: opacity .5s ease; } #block-yui_3_17_2_1_1669839743068_49521:hover #block-yui_3_17_2_1_1669786934605_193853 { opacity: 1 !important; transition: 1s; } w3 try it code <html> <head> <style> body { text-align: center; } .parent { width: 600px; height: 200px; } .child { width: 100%; height: 100%; background-color:rgba(255, 255, 255, 0); } .parent:hover .child { opacity: 1 !important; transition: 1s !important; } .child { border: none; padding: 50px 160px; margin-top: 50px; text-align: center; text-decoration: none; display: inline-block; font-size: 16px; opacity:0; transition: opacity .5s ease; } </style> </head> <body> <div class="parent"><img src="https://i.ibb.co/tKPzwMB/clapper-closed.png" alt="" /> <button class="child"><img src="https://i.ibb.co/Xb8SRs1/closed.png" alt="" /> </button> </div> </body> </html> Which block are you mentioning? BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
joshuaechevarriadop Posted December 1, 2022 Author Posted December 1, 2022 3 minutes ago, Beyondspace said: Which block are you mentioning? the circular images. Also is that how the site is loading for you? I have code removing the background color for the buttons and customized code for the center text. Should look like below image. but anyway what I would like to do is trigger the word "narrative" when the corresponding image is hovered on. This is actually a really annoying change with 7.1 fluid engine. In classic, when one could just use a "poster" effect for the image - all of it could be affected with one piece of code for that block. Now that they are separate blocks, it makes it much more complicated.
Beyondspace Posted December 1, 2022 Posted December 1, 2022 To set another element when hovering another element, we can use the javascript to handle the action of hovering element. By the way, have your tried using the list section to create this layout? joshuaechevarriadop 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - PDF Lightbox popup - ...) </> 🗓️ Delivery Date Picker (Date picker form field) Gallery block 7.1 workaround </> No-code customisations for Squarespace
joshuaechevarriadop Posted December 1, 2022 Author Posted December 1, 2022 2 hours ago, Beyondspace said: To set another element when hovering another element, we can use the javascript to handle the action of hovering element. By the way, have your tried using the list section to create this layout? The List selection doesnt have flexibility for text placement or movement to recreate what I've already made. Im best versed in html and css. Javascript is new for me - would you be able to help me out with that?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment