我想在特定框中放置图像、标题、一些文本,并且该框将被舍入。该框具有RGBA颜色不透明度的背景颜色。当框悬停时,溢出不起作用。我有以下html结构:
<article id="post-181" class="post-181 post type-post status-publish format-standard hentry category-uncategorized">
<header class="entry-header">
<h2 class="entry-title"><a href="#">A PARADISEMATIC COUNTRY</a></h2>
<div class="post-info">
<p>Posted by <a href="#">admin</a> on April 25, 2013</p>
</div>
</header>
<div class="entry-content">
<img width="270" height="208" src="http://roi.me/files/google-vs.-bing.jpg" class="alignright wp-post-image" alt="logos mini">
</div><!-- .entry-content -->
</article>
和CSS是:
.post {
margin-top: 20px; margin-left: 20px; width: 270px; height: 270px; margin-right: 30px; background: rgba(49, 187, 183, 0.5); border-radius: 50%; cursor: pointer; overflow: hidden; position: relative; -webkit-transition: .5s ease background;
}
.post .entry-content img {
position: absolute; top: 0; left: 0; min-height: 270px; min-width: 270px; margin: 0; z-index: -100; border: 1px solid red;
}
.post:hover {
background: rgba(49, 187, 183, 1);
}
我已经上传到 jsfiddle:
注意:我尝试过使用 firefox 和 chrome。Firefox 显示良好,但 chrome 不能!
请帮我。提前致谢。