<html lang="ja">
<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>レスポンシブ基礎2|フルードレイアウト</title>
<style>
*{
margin: 0;
padding: 0;
}
.box-wrapper{
width: 80%;
margin: 100px auto;
display: flex;
justify-content: space-between;
}
.box{
width: 23.5%;
height: 300px;
background-color: #bf4343;
}
@media (max-width:1000px){
.box-wrapper{
width: 92%;
}
}
@media (max-width:600px){
.box-wrapper{
display: block;
}
.box{
width: 100%;
margin-bottom: 20px;
}
}
</style>
</head>
<body>
<div class="box-wrapper">
<div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
</div>
</body>
</html>