I'm doing an institutional website and it's a type of web-design agency, but it's more to learn.
Then in the home I made several links with links to the pages of the services. And in each block my intention is to make when hovering over a short description before the user clicks and goes to the page.
I've been able to (in parts) do this in two ways (in both cases something went wrong):
1st way - overlapping two rows of blocks (the top one with the icons and titles and the bottom one with the descriptions) and when you hover the mouse over some upper block it changes the height
to 0%
making the block with the description appear below. Problem : Any movement on the mouse causes the class to exit :hover
(logically because the element disappears and the mouse exits from above).
2nd way - just a block race . so my intention was to do this: the block is there with the icon and title in the form of background-image
and the description there (in text within div
) in display:none
, ai in :hover
o background-image
becomes none
and description turns block
. Problem That way it did not work; I move the mouse over the div and it does not change the display, I tried with visibility
and it also did not work. (I let the part in question visible only for people to see but it is commented in the code).
Of the second way I could make the description in image form, it would work: just change the background-image
. But it would hurt in SEO.
I also tried with JavaScript and could not.