我想让悬停图像和链接添加到div但div不适合页面。将Div适合页面?
例如: http://test.peterstavrou.com/
看到图像如何被切断?
任何人有任何想法?
以下是我的代码。
CSS
#cf {
position:relative;
margin:0 auto;
}
#cf img {
position:absolute;
left:0;
-webkit-transition: opacity 1s ease-in-out;
-moz-transition: opacity 1s ease-in-out;
-o-transition: opacity 1s ease-in-out;
transition: opacity 1s ease-in-out;
}
#cf img.top:hover {
opacity:0;
}
HTML:
<a href="http://www.peterstavrou.com/product/ebay-listing-template/"><div id="cf"><img class="bottom" src="http://www.peterstavrou.com/wp-content/uploads/2014/11/eBay-Listing-Template-Price.jpg" alt="eBay Template Listing" width="292" height="311" /><img class="top" src="http://www.peterstavrou.com/wp-content/uploads/2014/11/eBay-Listing-Template.jpg" alt="eBay Template Listing" width="292" height="311" /></div></a>
<strong>Summary:</strong> TEST TEST TEST
<a title="eBay Template Listing" href="http://www.peterstavrou.com/product/ebay-listening-template/">Click here for more information.</a>
的jsfiddle http://jsfiddle.net/hz80govj/
什么意思是“适合页面”?如在填充100%的视口? – Terry 2014-11-23 10:12:28
请参阅http://test.peterstavrou.com/例如 了解图像如何切断? – Razzie 2014-11-24 00:50:18