절대 위치 요소들은 다음의 상대 위치 소자의 top
가고있다. 상위 위치 관계를 상대 위치로 만들어 부모 요소의 범위에 대한 절대 위치 경계를 줄입니다.
.thumbnail a {
position: relative;
display: block;
}
내가 위에서 때문에 .text-content
같이 적용될는 브라이언의 a
태그 내에
.thumbnail a {
position: relative;
display: block;
}
span.text-content {
position: absolute;
top: 10px;
left: 15px;
color: #fff;
font-size: 24px;
}
<div class="thumbnail">
<a href="">
<img src="http://placehold.it/580x278/333333/" alt="" />
<span class="text-content"><span>Shop Buckets</span></span>
</a>
</div>
<div class="thumbnail">
<a href="">
<img src="http://placehold.it/580x278/333333/" alt="" />
<span class="text-content"><span>Shop Bags</span></span>
</a>
</div>
감사에 위치한다. 그것은 위대한 운동을 한 것으로 보입니다. –