Tagged: x
-
AuthorPosts
-
September 13, 2016 at 12:06 am #1172530
AnnParticipantHey again,
I’m trying to create a hover effect on my home page that is currently under construction, and I have added the following code:
a.x-img.bottom-img-1 {
background: url(http://usitunesgiftcards.com/wp-content/uploads/2016/09/giftcard.jpg) no-repeat center top;
background-size: contain;
transition: 0.25s all ease-in-out;
}a.x-img.bottom-img-1:hover img {
opacity: 0;
transition: 0.25s all ease-in-out;
}a.x-img[class*=”bottom-img”] img {
transition: 0.25s all ease-in-out;
}and then added the class: bottom-img to the specific image.
But it is not working. Can you see what I’m doing wrong?
Thanks,
AnnSeptember 13, 2016 at 2:59 am #1172663
DarshanaModeratorHi there,
Thanks for writing in! As your site is currently under construction mode, we need your login credentials to check your current page.
Thanks!
September 13, 2016 at 1:39 pm #1173580
AnnParticipantThis reply has been marked as private.September 13, 2016 at 2:52 pm #1173709
JoaoModeratorHi There,
Use this instead:
img.x-img.bottom-img { background: url(http://usitunesgiftcards.com/wp-content/uploads/2016/09/giftcard.jpg) no-repeat center top; background-size: contain; transition: 0.25s all ease-in-out; } img.x-img.bottom-img:hover { opacity: 0; transition: 0.25s all ease-in-out; }Hope it helps
Joao
September 13, 2016 at 3:47 pm #1173783
AnnParticipantAwesome, one step closer 🙂
That made the image disappear when hover over, it is not displaying the specified image thought. Is there anything else I should add?
September 14, 2016 at 12:42 am #1174345
Paul RModeratorHi,
I added a unique class(my-column-1, my-column-2, my-column-3 ) to each columns where your images resides.
Kindly change the css code to this.
.my-column-1 { background: url(http://usitunesgiftcards.com/wp-content/uploads/2016/09/giftcard.jpg) no-repeat center top; background-size: contain; transition: 0.25s all ease-in-out; } .my-column-2 { background: url(http://usitunesgiftcards.com/wp-content/uploads/2016/09/giftcard.jpg) no-repeat center top; background-size: contain; transition: 0.25s all ease-in-out; } .my-column-3 { background: url(http://usitunesgiftcards.com/wp-content/uploads/2016/09/giftcard.jpg) no-repeat center top; background-size: contain; transition: 0.25s all ease-in-out; } img.x-img.bottom-img:hover { opacity: 0; transition: 0.25s all ease-in-out; }Hope that helps.
September 14, 2016 at 9:30 pm #1175912
AnnParticipantThat did it!
Thanks so much!
September 14, 2016 at 9:32 pm #1175915
AnnParticipantOne more question 🙂
If I would like to add an image row below, how would I update the code?
September 15, 2016 at 1:55 am #1176150
LelyModeratorHi There,
You’re welcome!
Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do (a link to a similar example site would be very helpful, or perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.September 15, 2016 at 12:46 pm #1176947
AnnParticipantI’m sorry for not being clear. If I add an additional row of images (see screen shot), how can I get the same hover effect (different hover image though) on those?
Dos that make sense?
September 15, 2016 at 5:06 pm #1177287
JadeModeratorHi there,
You can simply duplicate the row that contains the images then edit the contents and the hover effect should be carried out since the CSS code added to it is not specific to that one section that is in your page now.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1172530 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
