div的边距问题求助,为什么父div和子div的边距不显示
</head>
<style type="text/css">
#container{width: 1000px;
height: 500px;
background: red;}
#top{width: 500px;
height: 300px;
background: pink;}
#a{width: 10px;
height: 20px;
background: black;}
div{margin: 10px;}
</style>
<body>
<div id="container">
<div id="top"></div>
<div id="a"></div>
</div>
</body>
</html>