More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* | /* General container for all cards */ | ||
.card-container { | .card-container { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
gap: 20px; | justify-content: center; /* Center the cards */ | ||
gap: 20px; /* Space between cards */ | |||
padding: 20px; /* Padding for the container */ | |||
box-sizing: border-box; | |||
} | } | ||
/* | /* Individual card styling */ | ||
.card { | .card { | ||
width: | width: 300px; /* Adjust size for responsiveness */ | ||
height: 200px; | height: 200px; | ||
background-color: #fff; | background-color: #fff; | ||
border: 1px solid #ddd; | border: 1px solid #ddd; | ||
border-radius: 8px; | border-radius: 8px; | ||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | ||
perspective: 1000px; /* Enable 3D perspective */ | |||
position: relative; | |||
cursor: pointer; | cursor: pointer; | ||
transition: transform 0.6s ease | transition: transform 0.6s ease; | ||
} | } | ||
/* | /* Card inner wrapper */ | ||
.card-inner { | .card-inner { | ||
position: | position: relative; | ||
width: 100%; | width: 100%; | ||
height: 100%; | height: 100%; | ||
transform-style: preserve-3d; | transform-style: preserve-3d; | ||
transition: transform 0.6s ease | transition: transform 0.6s ease; | ||
} | } | ||
/* Front | /* Front and back styling */ | ||
.card-front, .card-back { | .card-front, .card-back { | ||
position: absolute; | position: absolute; | ||
Line 45: | Line 45: | ||
} | } | ||
.card-back { | .card-back { | ||
transform: rotateY(180deg); | transform: rotateY(180deg); | ||
background-color: #f8f8f8; /* Different background for back */ | |||
} | |||
/* Flip effect on hover */ | |||
.card:hover .card-inner { | |||
transform: rotateY(180deg); | |||
} | |||
/* Sub-panel inside the back */ | |||
.sub-panel { | |||
margin: 5px 0; | |||
font-size: 14px; | |||
color: #333; | |||
text-align: center; | |||
} | } | ||
/* | /* Styling for sub-card container */ | ||
.sub-card-container { | .sub-card-container { | ||
display: flex; | display: flex; | ||
Line 56: | Line 69: | ||
gap: 10px; | gap: 10px; | ||
justify-content: flex-start; | justify-content: flex-start; | ||
align-items: center; | |||
width: 100%; | width: 100%; | ||
padding: 10px; | padding: 10px; | ||
Line 61: | Line 75: | ||
} | } | ||
/* Sub-card */ | /* Sub-card styling */ | ||
.sub-card { | .sub-card { | ||
width: | width: 90%; | ||
height: | height: 60px; | ||
background-color: # | background-color: #ececec; | ||
border: 1px solid #ccc; | border: 1px solid #ccc; | ||
display: flex; | display: flex; | ||
justify-content: center; | justify-content: center; | ||
align-items: center; | align-items: center; | ||
border-radius: 4px; | |||
cursor: pointer; | cursor: pointer; | ||
transition: transform 0. | transition: transform 0.4s ease-in-out, background-color 0.3s; | ||
} | } | ||
.sub-card:hover { | |||
.sub-card | background-color: #ddd; | ||
} | } | ||
/* | /* Nested sub-card styling */ | ||
.sub-card- | .sub-card-container .sub-card-container { | ||
padding-left: 20px; | |||
border-left: 2px solid #ccc; | |||
margin-top: 10px; | |||
} | } |
Revision as of 02:36, 30 December 2024
/* General container for all cards */
.card-container {
display: flex;
flex-wrap: wrap;
justify-content: center; /* Center the cards */
gap: 20px; /* Space between cards */
padding: 20px; /* Padding for the container */
box-sizing: border-box;
}
/* Individual card styling */
.card {
width: 300px; /* Adjust size for responsiveness */
height: 200px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
perspective: 1000px; /* Enable 3D perspective */
position: relative;
cursor: pointer;
transition: transform 0.6s ease;
}
/* Card inner wrapper */
.card-inner {
position: relative;
width: 100%;
height: 100%;
transform-style: preserve-3d;
transition: transform 0.6s ease;
}
/* Front and back styling */
.card-front, .card-back {
position: absolute;
width: 100%;
height: 100%;
backface-visibility: hidden;
display: flex;
justify-content: center;
align-items: center;
padding: 10px;
box-sizing: border-box;
}
.card-back {
transform: rotateY(180deg);
background-color: #f8f8f8; /* Different background for back */
}
/* Flip effect on hover */
.card:hover .card-inner {
transform: rotateY(180deg);
}
/* Sub-panel inside the back */
.sub-panel {
margin: 5px 0;
font-size: 14px;
color: #333;
text-align: center;
}
/* Styling for sub-card container */
.sub-card-container {
display: flex;
flex-direction: column;
gap: 10px;
justify-content: flex-start;
align-items: center;
width: 100%;
padding: 10px;
box-sizing: border-box;
}
/* Sub-card styling */
.sub-card {
width: 90%;
height: 60px;
background-color: #ececec;
border: 1px solid #ccc;
display: flex;
justify-content: center;
align-items: center;
border-radius: 4px;
cursor: pointer;
transition: transform 0.4s ease-in-out, background-color 0.3s;
}
.sub-card:hover {
background-color: #ddd;
}
/* Nested sub-card styling */
.sub-card-container .sub-card-container {
padding-left: 20px;
border-left: 2px solid #ccc;
margin-top: 10px;
}