fix(feat): Rearrange the element to fix the responsive layout
This commit is contained in:
@@ -1,162 +1,237 @@
|
||||
.app-preview {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
gap: 60px;
|
||||
padding: 64px 16px 0;
|
||||
overflow: hidden;
|
||||
background: #fef0eb;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
gap: 60px;
|
||||
padding: 64px 16px 0;
|
||||
overflow: hidden;
|
||||
background: #fef0eb;
|
||||
}
|
||||
|
||||
.app-preview__header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
max-width: 940px;
|
||||
gap: 40px;
|
||||
margin: 0 auto;
|
||||
overflow: clip;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
max-width: 940px;
|
||||
gap: 40px;
|
||||
margin: 0 auto;
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
.app-preview__title {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
color: #1a1a1a;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
line-height: 1.2;
|
||||
color: #1a1a1a;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-preview__description {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #7a726d;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #7a726d;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.app-preview__carousel {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
gap: 12px;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 100%;
|
||||
gap: 24px;
|
||||
padding: 0 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.app-preview__side-phone {
|
||||
position: relative;
|
||||
display: none;
|
||||
flex-shrink: 0;
|
||||
width: 336px;
|
||||
height: 396px;
|
||||
overflow: hidden;
|
||||
opacity: 0.2;
|
||||
pointer-events: none;
|
||||
transition: opacity 300ms ease;
|
||||
position: relative;
|
||||
display: none;
|
||||
flex-shrink: 0;
|
||||
width: 336px;
|
||||
height: 396px;
|
||||
overflow: hidden;
|
||||
opacity: 0.2;
|
||||
pointer-events: none;
|
||||
transition: opacity 300ms ease;
|
||||
}
|
||||
|
||||
.app-preview__phone-image {
|
||||
position: absolute;
|
||||
top: -0.03%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
height: 175.34%;
|
||||
transition: opacity 300ms ease;
|
||||
position: absolute;
|
||||
top: -0.03%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
height: 175.34%;
|
||||
transition: opacity 300ms ease;
|
||||
}
|
||||
|
||||
.app-preview__control-wrap {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
align-self: stretch;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
align-self: stretch;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.app-preview__control-inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.app-preview__button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: #f08458;
|
||||
border: 0;
|
||||
border-radius: 9999px;
|
||||
cursor: pointer;
|
||||
transition: background-color 160ms ease, transform 160ms ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
background: #f08458;
|
||||
border: 0;
|
||||
border-radius: 9999px;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
background-color 160ms ease,
|
||||
transform 160ms ease;
|
||||
}
|
||||
|
||||
.app-preview__button:hover {
|
||||
background: #e07a3b;
|
||||
background: #e07a3b;
|
||||
}
|
||||
|
||||
.app-preview__button:active {
|
||||
transform: scale(0.95);
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.app-preview__button-icon {
|
||||
display: block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.app-preview__button-icon--next {
|
||||
transform: rotate(180deg);
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
|
||||
.app-preview__center-phone {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: min(420px, calc(100vw - 144px));
|
||||
aspect-ratio: 459 / 542;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
width: min(420px, calc(100vw - 168px));
|
||||
aspect-ratio: 459 / 542;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@media (max-width: 594px) {
|
||||
.app-preview__carousel {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.app-preview__button {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.app-preview__button-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.app-preview__center-phone {
|
||||
width: min(420px, calc(100vw - 120px));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 554px) {
|
||||
.app-preview__carousel {
|
||||
gap: 8px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.app-preview__button {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.app-preview__button-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
.app-preview__center-phone {
|
||||
width: min(420px, calc(100vw - 104px));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 540px) {
|
||||
.app-preview__center-phone {
|
||||
width: min(390px, calc(100vw - 120px));
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.app-preview__title {
|
||||
font-size: 40px;
|
||||
}
|
||||
.app-preview__title {
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
.app-preview__carousel {
|
||||
gap: clamp(10px, 1.4vw, 16px);
|
||||
padding: 0 clamp(16px, 3vw, 32px);
|
||||
}
|
||||
|
||||
.app-preview__side-phone,
|
||||
.app-preview__control-wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.app-preview__side-phone {
|
||||
display: block;
|
||||
width: clamp(128px, 17vw, 190px);
|
||||
height: auto;
|
||||
aspect-ratio: 336 / 396;
|
||||
}
|
||||
|
||||
.app-preview__center-phone {
|
||||
width: clamp(220px, 31vw, 320px);
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1023px) {
|
||||
.app-preview {
|
||||
padding: 120px 130px 0;
|
||||
}
|
||||
.app-preview {
|
||||
padding: 120px clamp(32px, 6vw, 130px) 0;
|
||||
}
|
||||
|
||||
.app-preview__title {
|
||||
font-size: 48px;
|
||||
}
|
||||
.app-preview__title {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
.app-preview__side-phone,
|
||||
.app-preview__control-wrap {
|
||||
display: flex;
|
||||
}
|
||||
.app-preview__side-phone,
|
||||
.app-preview__control-wrap {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.app-preview__carousel {
|
||||
gap: 20px;
|
||||
}
|
||||
.app-preview__carousel {
|
||||
gap: clamp(16px, 1.4vw, 20px);
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.app-preview__side-phone {
|
||||
display: block;
|
||||
}
|
||||
.app-preview__side-phone {
|
||||
display: block;
|
||||
width: clamp(190px, 20vw, 336px);
|
||||
}
|
||||
|
||||
.app-preview__center-phone {
|
||||
width: 459px;
|
||||
height: 542px;
|
||||
aspect-ratio: auto;
|
||||
}
|
||||
.app-preview__center-phone {
|
||||
width: clamp(300px, 27vw, 459px);
|
||||
height: auto;
|
||||
aspect-ratio: 459 / 542;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user