The way you've set it up, your .outer-bottomleft
will always be 20%
away from the bottom
.
A temporary solution would be to give .hide-button.btn-shop
and .bottomleft
a position: absolute
property
.outer-bottomleft {
position: absolute;
bottom: 20%;
left: 2%;
display: flex;
color: black;
flex-direction: row;
}
.outer-bottomleft .bottomleft {
display: none;
}
.outer-bottomleft:hover .bottomleft {
display: flex;
}
.outer-bottomleft:hover .hide-button {
display: none;
}
.shop-button-left {
width: 50%;
}
.shop-button-right {
width: 50%;
}
.hide-button.btn-shop,
.bottomleft {
position: absolute;
}
<div class="outer-bottomleft"> <span class="hide-button btn-shop">SHOP
</span>
<div class="bottomleft">
<div class="shop-button-left">
NEW FLAVOR: SHOP
</div>
<div class="shop-button-right">
<a href="#">
Test
</a>
</div>
</div>
</div>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…