プロが教えるわが家の防犯対策術!

htmlのコード
<!DOCTYPE html>
<html lang="jn">
<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">
<link rel="stylesheet" href="13-14-15.css">
<title>Document</title>
</head>
<body>
<div class="par">
<div id="child"></div>
<div id="child"></div>
<div id="tanin-oya">
<h3>親</h3>
<div class="tanin-child"></div>
<div class="tanin-child"></div>
</div>
</div>


</div>






</div>


</body>
</html>
cssのコード
.par{
height: 500px;
background-color: aqua;
display:flex;
justify-content: center;
}
#child{
height: 100px;
width: 100px;
margin: 10px;
background-color: orange;
}
#tanin-oya{
background-color:bisque;
height: 200px;
width: 200px;

}
#tanin-child{
height: 50px;
width: 50px;
margin: 10px;
background-color: yellow;
}
これがcssコードです
tanin-childの要素が出てこなくて困ってます、ご教授下さい

A 回答 (1件)

#tanin-child{ は id="tanin-child" の書き方です。



class="tanin-child" は .tanin-child{ です。
    • good
    • 0
この回答へのお礼

簡単なミスでしたありがとう

お礼日時:2022/12/31 17:28

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!