I had an issue when I mouse over card the text would appear on the navbar
I used z-index
on the navbar and it works properly.
But it kinder feels like a hack, So if you could kindly explain what is going on?
navbar properties (with z-index included)
#nav-bar {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
position: fixed;
padding-left: 30px;
padding-right: 10px;
background: var(--awesome-background);
z-index: 2;
}
card properties
.card {
width: 30%;
border: 1px solid var(--awesome-background);
transition: 0.5s;
}
.card:hover {
box-shadow: 10px 10px 5px grey;
cursor: pointer;
transform: scale(1.01);
}
This is a link to the project.
Bonus Question!?
When I mouse over the card and scroll without moving the mouse, the .card:hover
effect is still there until I move the mouse. How can I solve it?
Thank you