<img>
子要素が内部に配置されている親オブジェクトに影を追加しようとしています。はめ込み影が画像に重なるようにします。
私のHTMLコードは次のとおりです。
<section class="highlights">
<img src="images/hero.jpg" alt="" />
</section><!-- End section.highlights -->
およびCSS:
.highlights {
height: 360px;
padding: 0;
position: relative;
overflow: hidden;
opacity: 0.9;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
z-index:1;
}
.highlights img {
height: auto;
width: 100%;
margin: 0 auto;
display: block;
position: relative;
}
.highlights {
-webkit-box-shadow: inset 0 0 10px 0 rgba(0, 0, 0, 0.2);
box-shadow: inset 0 0 10px 0 rgba(0, 0, 0, 0.2);
}
影は私には現れません。私は何を間違えましたか?