4
I’m trying to replicate the menu effect of OW game modes selection and I came across the following problem:
Apparently it is working right. However, when the border appears, it has an extra spacing just below.
Code (replicate of Codepen):
.bastion-container {
display: flex;
justify-content: center;
padding: 20px;
background-color: lightslategray;
}
.bastion {
margin: 3px;
border: 2px solid transparent;
transition: all .5s;
}
.bastion-size {
height: 200px;
}
.bastion:hover {
transition: all .5s;
transform: scale(1.1);
border: 2px solid white;
}
<section class="bastion-container">
<div class="bastion">
<img class="bastion-size"src="//i.imgur.com/SZ9qGcM.png">
</div>
<div class="bastion">
<img class="bastion-size"src="//i.imgur.com/SZ9qGcM.png">
</div>
<div class="bastion">
<img class="bastion-size"src="//i.imgur.com/SZ9qGcM.png">
</div>
</section>
OBS: Refill of 0 (https://codepen.io/utamo/pen/EGqExQ) and I did, but I don’t know where I went wrong with that code. I opened it in Chrome, I checked margin
and padding
and found nothing. It is simply an empty space that is there...