When I set background-image to one of the div and set the background-size as contain, there will be gap between two divs.
the code is below:
<head>
<style>
.header {
height: 50px;
background: url('https://xxx.png') no-repeat;
background-size: contain;
}
.footer {
height: 30px;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
</div>
<div class="footer">
</div>
</div>
</body>
How to remove the gap?

Aucun commentaire:
Enregistrer un commentaire