You’re better of with a pure CSS solution since both approaches require the layering to be resolved. You’re going to have the layering issue with JS mouseover events. I believe the descriptions will need to be child elements of these overlay elements for hover effects to be applied, but they can reside on a lower z-index. Since they overlay everything, the hover state can always “see” these elements. Hovering over these is what triggers the respective description visibility. What I would do is have fully transparent elements which overlay everything, but are bounded by each image and caption extents. You could probably resolve this by fiddling with the z-index layering of the elements, but I think it’s a poor solution. The reverse cannot be true, when Mary’s description is visible, John’s is covered so the hover state cannot “see” it. Mary’s description occurs later, so the hover state can “see” it even when John’s description is visible. You’re targeting the description elements for the hover state, even though they are not initially visible. Example of adding a text on hover with the
element.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. It is possible to add a mouseover text description without Javascript and even without CSS. I've tried the code below but still not working. I would like the background color and text color exchange when I hover over the button. The background color is 3c52b2 and the text color is fff. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. I have created an Appbar component in React.js with 3 buttons in it but I would like to change the color when I hover over those buttons. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. My code is as follows currently just using CSS to achieve this effect: I’ve been thinking of using a simple JS add & remove script but I do not know how to append this to the class within multiple child divs. I’m thinking of using js to achieve this because once a user hovers right to left (Mary to John) the appearing div is stuck and does not go back to its original place as it does when hovered left to right (John to Mary). I’m currently building a custom hover effect while using WP-Bakery, what I’m trying to achieve is easy using HTML and 1 child div but due to the builder’s effect of adding additional divs I’m lost on how to achieve this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |