project demo
html code
Card Hover Effect - Dark CSS
Hover Me
Hover Me
Hover Me
css code
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #e8e8e8;
}
.wrapper {
display: flex;
flex-direction: column;
gap: 12px;
}
.card {
display: flex;
justify-content: center;
align-items: center;
width: 200px;
height: 70px;
border-radius: 7px;
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.11);
cursor: pointer;
transition: transform .3s ease, filter .3s ease;
}
.card p {
font-family: Arial, sans-serif;
font-weight: 600;
color: #fff;
letter-spacing: 1px;
}
.card:nth-child(1) {
background: rgb(253, 52, 86);
}
.card:nth-child(2) {
background: rgb(52, 183, 253);
}
.card:nth-child(3) {
background: rgb(17, 199, 29);
}
.wrapper:has(.card:hover) .card:not(:hover) {
filter: blur(5px);
transform: scale(.9, .9);
}
.card:hover {
transform: scale(1.1);
}