WEBサイト制作の勉強

WEBサイト制作の勉強の為の解説ブログです。

フェリカテクニカルアカデミー

9月6日の作業データ

<!DOCTYPE html>
<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;
}
/* pcレイアウト */
.box-wrapper{
width: 80%;
margin: 100px auto;
display: flex;
justify-content: space-between;
}
.box{
width: 23.5%;/* (100% - 6%) ÷ 4 */
height: 300px;
background-color: #bf4343;
}
/* 1000px以下の時 */
@media (max-width:1000px){
.box-wrapper{
width: 92%;
}
}
/* 600px以下の時 */
@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><!-- /.box-wrapper -->
</body>
</html>