MAC1 Posted October 7, 2023 Posted October 7, 2023 Hi, I've made a "Latest work" gallery (grid:simple) block on my home page. I'd like each image link to have a "hover" property like on my portfolio pages. Current layout: hover does nothing different and text description padding is too low on image. After changes: 1. padding on description text is closer up on image 2. Description text is this color #656565 3. Hover over stroke color #42c6ff + 5px stroke + image 20% bigger like in portfolio pages (motion/design/illustration) Desired look: Web: https://ellipse-teal-dl5w.squarespace.com/ Pass: 3 Cheers, Mac
tuanphan Posted October 9, 2023 Posted October 9, 2023 Hi, Can you share link to portfolio page? We can check hover effect easier Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
MAC1 Posted October 10, 2023 Author Posted October 10, 2023 https://ellipse-teal-dl5w.squarespace.com/illustration Sure here's the link thanks. Here's the css code I applied to the portfolio pages also to get stroke border: /*PORTFOLIO HOVER_________________*/ /* Show stroke border overlay on hover */ .grid-image { opacity: 1 !important; position: relative; } .grid-image:after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 5px solid rgba(66,198,255,0.8); /* change border color here */ transition: all 0.3s; opacity: 0; box-sizing: border-box; } .grid-item:hover .grid-image:after { opacity: 1; transition: all 0.3s; } /*PORTFOLIO HOVER END______________*/ //-----------------------------------
Solution tuanphan Posted October 12, 2023 Solution Posted October 12, 2023 Use this code for Gallery /* Replicate hover effect on Gallery */ .gallery-grid-image-link { opacity: 1 !important; overflow: hidden; } .gallery-grid-image-link:after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 5px solid rgba(66,198,255,0.8); /* change border color here */ transition: all 0.3s; opacity: 0; box-sizing: border-box; } figure.gallery-grid-item:hover .gallery-grid-image-link:after { opacity: 1; transition: all 0.3s; } figure.gallery-grid-item:hover img { transform: scale(1.1); transition: all 0.3s; } figure.gallery-grid-item img { transition: all 0.3s; } MAC1 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
MAC1 Posted October 13, 2023 Author Posted October 13, 2023 thank you works lovely! have a good one! :)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment