所以我试图把一些东西堆叠在一起。首先,它将有助于查看工作链接,您将看到问题:
http://brownbox.net.au/clients/matchlessphotography/
现在我需要使用以下代码:
<div id="blogposts">
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
<a><span><strong class="title_blog_mini_post">Post Title</strong></span><img src="images/wp-evential/sample-blog.jpg" width="197" height="134" /></a>
</div>
并将跨度直接放在图像的顶部,在底部,这样当它在jQuery中动画时,看起来好的叠加层会向下滑动到不到一半的大小,并且会弹出帖子标题文本。
现在我几乎在那里,但它不起作用。 我需要修复哪些CSS才能执行此操作?这是当前的css:
#blogposts{width:100%; height:auto; margin-left:8px; margin-top:20px; margin-bottom:30px; float:left; overflow:hidden; }
#blogposts a{border:1px solid #141414;-webkit-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.7), inset 0px 0px 1px 1px rgba(255, 255, 255, 0.5);-moz-box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.7), inset 0px 0px 1px 1px rgba(255, 255, 255, 0.5);box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.7), inset 0px 0px 1px 1px rgba(255, 255, 255, 0.5);-webkit-border-radius: 12px;
-moz-border-radius: 12px;border-radius: 12px; margin:10px 18px 9px 5px; width:197px; height:134px; display:block; float:left;}
#blogposts img{-webkit-border-radius: 11px;width:197px; height:134px; -moz-border-radius: 11px;border-radius: 11px; margin-top:0px; float:left;}
#blogposts span{z-index: 1000;float: left;bottom:-146px; width:177px; height:114px; background-image:url(images/misc/picoverlay.png); -moz-border-radius: 11px;border-radius: 11px; -webkit-box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.3);
-moz-box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.3);box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.3); padding:10px; font-size:18px; font-family:Georgia, "Times New Roman", Times, serif; font-style:italic; font-weight:bold; border:1px solid #141414;}
答案 0 :(得分:-2)
Z-index只会影响位置设置为“绝对”或“固定”的对象。 默认情况下,位置设置为“relative”,并且将忽略“z-index”css属性。