100-project-100-days-website/100_projects/91-rotating-image-gallery/style.css
2023-05-23 17:16:51 +03:00
Ask

59 lines
1011 B
CSS

{5ef8aea174f12ca3c3eebcde1b25b6b382d39cf1 true 1011 style.css 0xc002a7c7e0}

body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
height: 100vh;
justify-content: center;
background-color: #b6a35f;
overflow: hidden;
}
.image-container {
position: relative;
width: 200px;
height: 200px;
transform-style: preserve-3d;
transform: perspective(1000px) rotateY(0deg);
transition: transform 0.7s;
}
.image-container span {
position: absolute;
top: 0;
left: 0;
width: 100%;
transform: rotateY(calc(var(--i) * 45deg)) translateZ(400px);
}
.image-container span img {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 150px;
}
.btn-container {
position: relative;
width: 80%;
}
.btn {
position: absolute;
bottom: -80px;
background-color: #aac388;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: .3s;
font-size: 18px;
}
.btn:hover {
filter: brightness(1.5);
color: #000;
}
#prev {
left: 20%;
}
#next {
right: 20%;
}