Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
http://jsfiddle.net/hashie5/5p7Jk/
当您将图像悬停时,标题会向上滑动, 但正如您所见 ,标题应位于顶部几 px 处以与图片对齐
我怎么能在不向图形标签添加高度的情况下做到这一点,因为图像的高度会有所不同
只需添加figure img {display:block;}到您的 CSS。
figure img {display:block;}