요소를 겹치려면 CSS z-index 속성을 사용하세요. 다음 코드를 실행하여 z-색인 속성을 구현하고 텍스트 뒤에 이미지를 설정할 수 있습니다.
예시
<!DOCTYPE html>
<html>
<head>
<style>
img {
position: absolute;
left: 0px;
top: 0px;
z-index: -1;
}
</style>
</head>
<body>
<img src = "https://www.tutorialspoint.com/assets/videotutorials/courses/swift_4_online_training/380_course_210_image.jpg" width="300" height="250">
<p>This is demo text.</p>
</body>
</html>