
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
제가 코드를 임의로 수정했는데
캡처 화면처럼 라이브 화면에 코드가 그대로 출력됩니다.
display: flex;
를 지우면 사라져서 이 부분이 문제인가 싶은데, 이걸 지우면 화면이 왼쪽 정렬로 바뀌어서요.
이 문제를 어떻게 해결할 수 있을까요?

작성한 코드 및 에러 메세지
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2023년 버킷리스트</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Hahmlet:wght@400;500;600;700&display=swap');
* {
display: flex;
font-family: 'Hahmlet', serif;
flex-direction: column;
align-items: center;
justify-content: center;
}
.title {
color: white;
background-color: tomato;
font-size: 24px;
padding: 4px 14px;
border-radius: 8px;
}
.bg {
width: 360px;
background-image: url("https://drive.google.com/uc?export=view&id=1XSNzETUDlorNJ25QS6UV0kDO6stCMOj6");
}
.msg {
font-weight: bold;
}
.bucket {
width: 160px;
height: 160px;
background-size: cover;
background-position: center;
margin: 8px;
position: relative;
font-weight: bold;
font-size: 16px;
text-align: center;
word-break: keep-all;
}
.img1 {
background-image: url("https://drive.google.com/uc?export=view&id=10nkOeyIvpwmYOzDC70ZSLOhdqcONcSVE");
background-size: cover;
background-position: center;
}
.img2 {
background-image: url("https://s3.ap-northeast-2.amazonaws.com/materials.spartacodingclub.kr/bucketList/bucket-lightred.png");
background-size: cover;
background-position: center;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.center {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.done::after {
content: "";
width: 70%;
height: 70%;
background-image: url("https://s3.ap-northeast-2.amazonaws.com/materials.spartacodingclub.kr/bucketList/stamp.png");
background-size: cover;
background-position: center;
position: absolute;
top: 20%;
}
.wrap {
flex-wrap: wrap;
}
</style>
</head>
<body class="bg center">
<h1 class="title">2023 신년계획</h1>
<p class="msg">올해는 꼭 모두 지키자</p>
<div class="row flex-row wrap">
<div class="bucket img1 center">바디프로필 찍기</div>
<div class="bucket img2 center">바디프로필 찍기</div>
<div class="bucket img2 center">바디프로필 찍기</div>
<div class="bucket img1 center">바디프로필 찍기</div>
<div class="bucket img1 center">바디프로필 찍기</div>
<div class="bucket img2 center">바디프로필 찍기</div>
</div>
</body>
</html>
오류 발생 시, 작성한 코드 전체와 에러 메시지를 첨부해 주세요.
Tip 1) </> 아이콘을 눌러 코드박스를 만들어 보세요.
Tip 2) Ctrl+A(맥의 경우 Command+A) 단축키로 코드를 한 번에 선택할 수 있어요!
