-
AuthorPosts
-
October 28, 2014 at 8:30 am #133687
Hi Support,
I hope you can help. I’m trying to get an image to appear black and white on the site and then when the mouse hovers over the image the photo changes to color. Is this possible with the [image] shortcode, or can you advise how i can do this?
Thanks for your help.
All the best
David.
October 28, 2014 at 11:08 am #133800Hi David,
Thanks for writing in,
Yes, Its possible, As I understand
Just add a class on your image,
e.g. add a class change-on-hover on image class field,
Then add this code below in Customizer > Custom > CSS
.change-on-hover { webkit-filter: grayscale(1); -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); filter: gray; filter: grayscale(100%); } .change-on-hover:hover { webkit-filter: none; -webkit-filter: none; -moz-filter: none; filter: none; }
Hope that helps,
Cheers
October 28, 2014 at 12:24 pm #133860Brilliant – thanks guys, great service as always!
October 28, 2014 at 1:50 pm #133923No Problem,
Have a great day 🙂
October 25, 2015 at 12:20 am #638495How would I make the “On Hover” action to add a specific color around the photo?
October 25, 2015 at 1:28 am #638551Hello There,
Thanks for updating this thread!
To add a specific color around the photo, please edit your page in Cornerstone and insert the following custom css in the settings tab, Settings > Custom CSS
.change-on-hover:hover { -webkit-box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75); -moz-box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75); box-shadow: 1px 1px 5px 0px rgba(0,0,0,0.75); }
We would loved to know if this has work for you. Thank you.
November 1, 2015 at 1:27 pm #648440Hello,
Just a quick question regarding the first response above. I understand all of the steps except how to “add a class change-on-hover on image class field”. Basically, where do I input: change-on-hover ?
Thanks!
November 1, 2015 at 5:58 pm #648590Hi there,
If you’re using standard shortcode, then you can simply add it like this,
[image class="change-on-hover"]
If you’re using cornerstone, then you can simply inspect your image element, then add change-on-hover on class input like this.
But before you can add a class name, you should enable advance controls first like from that screenshot.
Cheers!
November 3, 2015 at 3:30 am #650487This reply has been marked as private.November 3, 2015 at 4:16 am #650533Hi there,
Thanks for updating the thread!
I’ve checked your site and in your custom CSS in the Customizer, there’s a missing closing curly bracket in it (see: http://prntscr.com/8yhqqr). Please add it after this code in your Customizer CSS:
.x-navbar { border-bottom: none; box-shadow: none;
Hope this helps. 🙂
Thank you!
November 3, 2015 at 4:25 am #650540Wow my mistake. This fixed it. Thanks very much for your fast service. 🙂
November 3, 2015 at 5:36 am #650587You’re welcome! 🙂
-
AuthorPosts