<style type="text/css">
.img_test td {
background-image : url('https://t1.daumcdn.net/cfile/tistory/2179074B550B9B360C');
background-position : center;
background-repeat : no-repeat;
border-radius : 5px;
border : 4px solid gray;
color : white;
font-size : 22pt;
font-weight : bold;
height : 250px;
margin-bottom : 10px;
text-align : center;
text-shadow : 0 0 5px black;
width : 50%;
}
</style>
<table class="img_test" cellpadding="0" cellspacing="5" align="center" width="80%">
<tr>
<td style="background-size:200px;">200px</td>
<td style="background-size:500%;">500%</td>
</tr>
<tr>
<td style="background-size:200px 100px;">200px 100px</td>
<td style="background-size:100% 100%;">100% 100%</td>
</tr>
<tr>
<td style="background-size:contain;">contain</td>
<td style="background-size:cover;">cover</td>
</tr>
</table>
<br>사용한 이미지
<br><img src="https://t1.daumcdn.net/cfile/tistory/2179074B550B9B360C">
- 기본적인 모습을 예제로 만들어 보았습니다.
- 느낌이 잘 안오시죠? 이제 아래 예제를 통해 하나씩 살펴봅시다 ^^