我正在尝试将 2 个图像叠加在一起,但顶部的第二个图像也是一个链接。
这是它的工作代码:
<div style="position: relative; left: 0; top: 0;">
<img src="http://www.handicappedpets.com/images/newproducts/fabricharnessweb.jpg" style="position: relative; top: 0; left: 0;"/>
<a href="http://pinterest.com/pin/create/button/?url=http%3A%2F%2Fwww.handicappedpets.com%2Findex.php%2Fwalkin-wheels-rear-harness.html&media=http%3A%2F%2Fwww.handicappedpets.com%2Fimages%2Fnewproducts%2Ffabricharnessweb.jpg&description=The%20Walkin'%20Wheels%20Rear%20Harness%20is%20used%20to%20support%20your%20dogs%20hind%20quarters.%20Starting%20at%20%2439.99" class="pin-it-button" count-layout="horizontal"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" style="position: absolute; top: 425px; left: 20px;" /></a>
</div>
(或者你可以点击这里)http://jsfiddle.net/danield770/nFvUu/3/
但如果我把这段代码扔到一个真实的网站.. http://www.handicappedpets.com/index.php?option=com_content&view=article&id=819 它把图像推到一边,而不是在彼此之上。
关于它为什么这样做的任何想法?
谢谢