이미지 중간에 텍스트를 올바르게 배치하는 방법을 알아 내려고하고 있습니다. 나는 그걸 중심에 놓았지만, 이미지의 맨 위에 있었고, 중간에 죽지는 않았다.가운데 이미지 가운데에있는 이미지
#ImageMain {
background-image: url(C:/Users/Gabriel/Downloads/bg.jpg);
width: 80%;
height: 700px;
position: relative;
display: block;
margin-right: auto;
margin-left: auto;
opacity: 0.8;
}
#TextMain h1 {
font-size: 100px;
font-family: "PT Sans", sans-serif;
}
<div id="ImageMain">
<div id="TextMain">
<h1>Shop our Whole Selection</h1>
</div>
</div>