Henke82 Posted January 11, 2023 Share Posted January 11, 2023 Hi, been trying to get this to work for a couple of hours now. I'm using the Avenue template to display my portfolio and it has a quite nice hover effect built in (it changes the opacity of the image). However, I would much rather to have a .gif play instead of that effect. I have managed to get this to work on separate pages with video and image blocks, but I really can't get this to work as all the images are presented on an index page. So to even find the right ID on an index page seems like a struggle, all the Chrome "Squarespace ID finder" gives me is the collection ID. I've also ventured into the actual code to see anything there, and there I found both a specific "collectionid" plus a specific "gallery-block" id for one of my images. But when trying to apply a code such as this one (that worked for an image block on a separate page), I can't get it to work for the images on my index page. Very much appreciate some help on this. The website is https://www.henrikhedin.com/ Thanks. Link to comment
tuanphan Posted January 15, 2023 Share Posted January 15, 2023 You mean Hover on each item >> Replace image with gif + show overlay + show title? 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!) Link to comment
Henke82 Posted January 16, 2023 Author Share Posted January 16, 2023 Not necessarily show overlay, but replace with gif and title would be nice. On 1/15/2023 at 2:26 AM, tuanphan said: You mean Hover on each item >> Replace image with gif + show overlay + show title? Link to comment
Solution tuanphan Posted January 18, 2023 Solution Share Posted January 18, 2023 On 1/16/2023 at 9:07 PM, Henke82 said: Not necessarily show overlay, but replace with gif and title would be nice. (This code for first, second items. Replace Pixabay with gif urls) Add to Design > Custom CSS a.project[href="/swedish-police-2021/"]:hover img { content: url(https://cdn.pixabay.com/photo/2020/12/23/21/21/macarons-5856039_1280.jpg); } a.project[href="/interflora/"]:hover img { content: url(https://cdn.pixabay.com/photo/2023/01/10/00/17/italy-7708552_1280.jpg); } 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!) Link to comment
Henke82 Posted January 19, 2023 Author Share Posted January 19, 2023 14 hours ago, tuanphan said: (This code for first, second items. Replace Pixabay with gif urls) Add to Design > Custom CSS a.project[href="/swedish-police-2021/"]:hover img { content: url(https://cdn.pixabay.com/photo/2020/12/23/21/21/macarons-5856039_1280.jpg); } a.project[href="/interflora/"]:hover img { content: url(https://cdn.pixabay.com/photo/2023/01/10/00/17/italy-7708552_1280.jpg); } Thanks a lot, works perfectly! Link to comment
wernerbotha Posted January 19, 2023 Share Posted January 19, 2023 Hi Sorry I'm just jumping in here... Would this work for my site as well? www.wernerbotha.com I currently only have gifs as my projects images, but would also like the rollover effect I just tried it and didn’t really work, I would really appreciate the help Thanks!! Link to comment
tuanphan Posted January 26, 2023 Share Posted January 26, 2023 On 1/19/2023 at 9:47 PM, wernerbotha said: Hi Sorry I'm just jumping in here... Would this work for my site as well? www.wernerbotha.com I currently only have gifs as my projects images, but would also like the rollover effect I just tried it and didn’t really work, I would really appreciate the help Thanks!! Use this CSS a.grid-item[href="/work/feature-film-meisies-wat-fluit"]:hover img { content: url(https://cdn.pixabay.com/photo/2020/12/23/21/21/macarons-5856039_1280.jpg); } a.grid-item[href="/work/nissan-magnite"]:hover img { content: url(https://cdn.pixabay.com/photo/2023/01/10/00/17/italy-7708552_1280.jpg); } wernerbotha 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!) Link to comment
wernerbotha Posted January 26, 2023 Share Posted January 26, 2023 Thanks you very much Tuan! It worked perfect! I have one more question, is there a way to add a quick fade transition before AND after the image hover? I really appreciate it! Link to comment
tuanphan Posted January 28, 2023 Share Posted January 28, 2023 On 1/27/2023 at 3:00 AM, wernerbotha said: Thanks you very much Tuan! It worked perfect! I have one more question, is there a way to add a quick fade transition before AND after the image hover? I really appreciate it! Hi, This will require different code. Can you remove temporarily the code I sent? I can test code again 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!) Link to comment
wernerbotha Posted January 30, 2023 Share Posted January 30, 2023 Hi Tuan Yes I can remove it, please let me know what you need from me to get this new code from you? Thanks!! Link to comment
tuanphan Posted February 2, 2023 Share Posted February 2, 2023 On 1/30/2023 at 4:15 PM, wernerbotha said: Hi Tuan Yes I can remove it, please let me know what you need from me to get this new code from you? Thanks!! Sorry. Just had some days off. Do you still need help? 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!) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment