1
我希望把文本圖像如何將圖像中心對齊文本?
該中心是我想要的東西:
這是我有:
請指引我,我的代碼如下:
.h3-dis {
position: absolute;
width: 100%;
font-size: 18px;
color: #fff;
font-weight: normal;
padding: 10px;
background: rgba(0, 0, 0, 0.31);
border-radius: 5px;
text-align: center;
z-index: 1;
display: block;
margin: 0 auto;
}
.op-img {
position: inherit;
opacity: .5;
}
<a href="#">
<div class="h3-dis">Description</div>
<img src="img/small-1.png" class="op-img img-responsive">
</a>
謝謝 但無法響應。 – sami