yintai-company-home/src/components/layout/RowAccordion/index.module.css

144 lines
3.9 KiB
CSS

:root {
--duration: 0.4s;
}
.rowAccordion {
position: relative;
overflow-anchor: none;
padding: 0 260px;
width: 100%;
height: 100vh;
}
.rowAccordionBgContainer {
position: absolute;
inset: 0;
z-index: 0;
}
.rowAccordionBgLayer {
position: absolute;
inset: 0;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
transition: opacity var(--duration) ease;
}
.rowAccordion .headerRow,
.rowAccordion .contentRow {
position: relative;
z-index: 1;
}
.rowAccordion {
.headerRow {
width: 100%;
height: 250px;
display: flex;
align-items: center;
justify-content: center;
.title {
font-weight: 700;
font-size: 40px;
color: #FFFFFF;
line-height: 50px;
}
}
.contentRow {
height: 100%;
display: flex;
color: #fff;
.contentItem {
flex: 1;
transition: flex var(--duration) ease, padding-bottom var(--duration) ease;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding-top: 100px;
padding-bottom: 100px;
border-left: 1px solid #fff;
&:last-child {
border-right: 1px solid #fff;
}
.contentItemContainer {
padding: 0 20px;
min-height: 100px;
display: flex;
flex-direction: column;
justify-content: center;
margin-left: -3px;
transition: all var(--duration) ease-in-out;
position: relative;
&::before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 5px;
height: 100px;
background: #14355C;
}
}
.contentItemTitle {
height: 100px;
font-weight: 500;
font-size: 24px;
color: #FFFFFF;
transition: all var(--duration) ease-in-out;
margin-bottom: 6px;
display: flex;
align-items: center;
white-space: nowrap;
}
.contentItemSubtitle {
font-size: 20px;
transition: font-size var(--duration) ease-in-out;
}
.contentItemContentWrapper {
box-sizing: border-box;
height: 0;
opacity: 0;
transition: all var(--duration) ease-in-out;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
/* padding: 60px 0; */
margin-top: 20px;
}
.contentItemContent {
font-size: 16px;
/* margin-top: 40px; */
}
.contentItemLinks {
font-weight: 700;
font-size: 16px;
color: #FFFFFF;
line-height: 30px;
text-decoration-line: underline;
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: 30px 20px;
}
}
.contentItem.active {
flex: 2;
padding-bottom: 200px;
.contentItemContainer {
padding: 0 40px;
}
.contentItemTitle {
font-size: 40px;
}
.contentItemSubtitle {
font-size: 24px;
}
.contentItemContentWrapper {
height: 300px;
opacity: 1;
}
}
}
}