I'd like to know what CSS structure needs to be applied to get div
s increase with a good animation transition at height and width CSS level, the internal contents of div
need not occur, idea is looks like the link below:
Code that I have so far:
main {
height: 100vh;
}
.main_principal {
height: 70vh;
background: #0b4c81;
}
.main_cards {
height: 30vh;
background: #042a3f;
display: -webkit-box;
transition: all .5s;
}
.card {
width: 20%;
padding: 10px 7.5px;
height: 100%;
transition: all .5s;
text-align: center;
position: relative;
}
/*ANIMATION*/
.card:hover {
-webkit-transform: scale(1.3);
-moz-transform: scale(1.3);
-o-transform: scale(1.3);
transform: scale(1.3);
}
/*ANIMATION*/
.card_info {
height: 100%;
background: #0b4c81;
display: flex;
justify-content: center;
flex-direction: column;
color: #ffffff;
}
<!DOCTYPE html>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script></head><body><main><sectionclass="main_principal"></section>
<section class="main_cards">
<div class="card">
<div class="card_info">
<span>Lorem Ipsum</span>
</div>
</div>
<div class="card">
<div class="card_info">
<span>Lorem Ipsum</span>
</div>
</div>
<div class="card">
<div class="card_info">
<span>Lorem Ipsum</span>
</div>
</div>
<div class="card">
<div class="card_info">
<span>Lorem Ipsum</span>
</div>
</div>
<div class="card">
<div class="card_info">
<span>Lorem Ipsum</span>
</div>
</div>
</section>
</main>
</body>
</html>