Skip to content

Commit

Permalink
responsive slider 3d
Browse files Browse the repository at this point in the history
  • Loading branch information
HoanghoDev committed Jun 13, 2024
1 parent 3d10400 commit 0042919
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions slider_3d/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,47 @@
background-repeat: no-repeat;
background-position: top center;
z-index: 1;
}
@media screen and (max-width: 1023px) {
.banner .slider{
width: 160px;
height: 200px;
left: calc(50% - 80px);
}
.banner .slider .item{
transform:
rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
translateZ(300px);
}
.banner .content h1{
text-align: center;
width: 100%;
text-shadow: 0 10px 20px #000;
font-size: 7em;
}
.banner .content .author{
color: #fff;
padding: 20px;
text-shadow: 0 10px 20px #000;
z-index: 2;
max-width: unset;
width: 100%;
text-align: center;
padding: 0 30px;
}
}
@media screen and (max-width: 767px) {
.banner .slider{
width: 100px;
height: 150px;
left: calc(50% - 50px);
}
.banner .slider .item{
transform:
rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg))
translateZ(180px);
}
.banner .content h1{
font-size: 5em;
}
}

0 comments on commit 0042919

Please sign in to comment.