Почему текст выходит наверх если ставлю margin: 0?
Вот css:
body {
margin: 0;
font-family: 'Montserrat', sans-serif;
font-size: 15px;
line-height: 1.6px;
color: #333;
}
*,
*:after,
*:before: {
box-sizing: border-box;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
margin-top: 20.1px;
}
/* Container */
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
}
/* Intro */
.intro {
width: 100%;
height: 100vh;
background: url(../images/intro.jpg) center no-repeat;
-webkit-background-size: cover;
background-size: cover;
}
И html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="assets/css/style.css">
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&family=Montserrat:ital,wght@0,700;1,300&display=swap" rel="stylesheet">
<title>Mogo</title>
</head>
<body>
<div class="intro">
<div class="container">
<h1>Mogo</h1>
</div>
</div>
</body>
</html>