영상에 나오는 float 방식이 아니라 display 로 구현을 했는데 똑같이 작동하기만 하면 상관 없는건가요?
영상에 나온 방식이 아니라서 똑바로 만든건지 잘 모르겠습니다
일단 코드를 보내봅니다...
--------------------HTML-----------------------------
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css.css">
</head>
<body>
<div class="content">
<div class="text_box">
<h4>
Fast Shipping
</h4>
<p>
lorem ipsum
</p>
</div>
<div class="text_box">
<h4>
Fast Shipping
</h4>
<p>
lorem ipsum
</p>
</div>
<div class="text_box">
<h4>
Fast Shipping
</h4>
<p>
lorem ipsum
</p>
</div>
<div class="text_box">
<h4>
Fast Shipping
</h4>
<p>
lorem ipsum
</p>
</div>
</div>
</body>
</html>
-------------------CSS-------------------------
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
background-color: black;
}
.content {
display: flex;
flex-wrap: wrap;
background-color: white;
width: 1000px;
}
.text_box {
box-sizing: border-box;
width: 250px;
padding: 20px;
text-align: center;
}
@media screen and (max-width:1200px) {
.content {
width: 500px;
}
}
@media screen and (max-width:768px) {
.content {
width: 250px;
}
}