我有一组四个图像,我的功能目标是当您将鼠标悬停在图像缩略图上时,它会应用一个覆盖层,其中包含一些您可以单击的信息。
为了给您一个想法,请看一下这张图片:
我已经掌握了基础知识,但目前叠加层仅堆叠在左上角图像中。不知道如何解决它,所以我想知道你们是否可以帮忙。
这是网站:
http://lab.albionmedia.biz/clients/silverdale/
看看我的编码并看看你的想法!
I have a set of four images, and my functionality goal is so that when you hover the mouse over the image thumbnail, it applies an overlay with some information that you can click.
To give you an idea, take a look at this image:
I've got the basics down, but currently the overlays are just stacking in the top left image. Not sure how to fix it, so I wondered if you guys could help.
Here's the website:
http://lab.albionmedia.biz/clients/silverdale/
Have a look at my code and see what you think!
发布评论
评论(2)
div 现在是块元素,并且它们没有高度,因为它们被浮动/绝对定位元素填充。
更改:
至:
您应该得到更接近您想要的东西。此后可能需要一些调整。
The div's are now block elements, and they have no height because they are filled by floats/absolute positioned elements.
Change:
To:
And you should get something much closer to what you want. It might need some tweaking after this.
无需接触 CSS,您就可以让 jQuery 为您完成所有工作。
without touching the CSS, you could get jQuery to do everything for you.