-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0007609
commit ed5463a
Showing
14 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>3D Card Carousel</title> | ||
<style> | ||
|
||
*{ | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
body{ | ||
background-color: #D2D2D2; | ||
background-image: | ||
repeating-linear-gradient( | ||
to right, transparent 0 100px, | ||
#25283b22 100px 101px | ||
), | ||
repeating-linear-gradient( | ||
to bottom, transparent 0 100px, | ||
#25283b22 100px 101px | ||
); | ||
} | ||
|
||
body::before{ | ||
position: absolute; | ||
width: min(1400px, 90vw); | ||
top: 10%; | ||
left: 50%; | ||
height: 90%; | ||
transform: translateX(-50%); | ||
content: ''; | ||
background-image: url(images/bg.png); | ||
background-size: 100%; | ||
background-repeat: no-repeat; | ||
background-position: top center; | ||
pointer-events: none; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
|
||
<div class="banner"> | ||
<div class="slider" style="--quantity: 10"> | ||
<div class="item" style="--position: 1"><img src="images/dragon_1.jpg" alt=""></div> | ||
<div class="item" style="--position: 2"><img src="images/dragon_2.jpg" alt=""></div> | ||
<div class="item" style="--position: 3"><img src="images/dragon_3.jpg" alt=""></div> | ||
<div class="item" style="--position: 4"><img src="images/dragon_4.jpg" alt=""></div> | ||
<div class="item" style="--position: 5"><img src="images/dragon_5.jpg" alt=""></div> | ||
<div class="item" style="--position: 6"><img src="images/dragon_6.jpg" alt=""></div> | ||
<div class="item" style="--position: 7"><img src="images/dragon_7.jpg" alt=""></div> | ||
<div class="item" style="--position: 8"><img src="images/dragon_8.jpg" alt=""></div> | ||
<div class="item" style="--position: 9"><img src="images/dragon_9.jpg" alt=""></div> | ||
<div class="item" style="--position: 10"><img src="images/dragon_10.jpg" alt=""></div> | ||
</div> | ||
<div class="content"> | ||
|
||
|
||
<div class="model"></div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
@import url('https://fonts.cdnfonts.com/css/ica-rubrik-black'); | ||
@import url('https://fonts.cdnfonts.com/css/poppins'); | ||
|
||
.banner{ | ||
width: 100%; | ||
height: 100vh; | ||
text-align: center; | ||
overflow: hidden; | ||
position: relative; | ||
} | ||
.banner .slider{ | ||
position: absolute; | ||
width: 200px; | ||
height: 250px; | ||
top: 10%; | ||
left: calc(50% - 100px); | ||
transform-style: preserve-3d; | ||
transform: perspective(1000px); | ||
animation: autoRun 20s linear infinite; | ||
z-index: 2; | ||
} | ||
@keyframes autoRun{ | ||
from{ | ||
transform: perspective(1000px) rotateX(-16deg) rotateY(0deg); | ||
}to{ | ||
transform: perspective(1000px) rotateX(-16deg) rotateY(360deg); | ||
} | ||
} | ||
|
||
.banner .slider .item{ | ||
position: absolute; | ||
inset: 0 0 0 0; | ||
transform: | ||
rotateY(calc( (var(--position) - 1) * (360 / var(--quantity)) * 1deg)) | ||
translateZ(550px); | ||
} | ||
.banner .slider .item img{ | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
.banner .content{ | ||
position: absolute; | ||
bottom: 0; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: min(1400px, 100vw); | ||
height: max-content; | ||
padding-bottom: 100px; | ||
display: flex; | ||
flex-wrap: wrap; | ||
justify-content: space-between; | ||
align-items: center; | ||
z-index: 1; | ||
} | ||
.banner .content h1{ | ||
font-family: 'ICA Rubrik'; | ||
font-size: 16em; | ||
line-height: 1em; | ||
color: #25283B; | ||
position: relative; | ||
} | ||
.banner .content h1::after{ | ||
position: absolute; | ||
inset: 0 0 0 0; | ||
content: attr(data-content); | ||
z-index: 2; | ||
-webkit-text-stroke: 2px #d2d2d2; | ||
color: transparent; | ||
} | ||
.banner .content .author{ | ||
font-family: Poppins; | ||
text-align: right; | ||
max-width: 200px; | ||
} | ||
.banner .content h2{ | ||
font-size: 3em; | ||
} | ||
.banner .content .model{ | ||
background-image: url(images/model.png); | ||
width: 100%; | ||
height: 75vh; | ||
position: absolute; | ||
bottom: 0; | ||
left: 0; | ||
background-size: auto 130%; | ||
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; | ||
} | ||
} |