-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #479 from trip0le/trip0le
Added an HTML CSS project- Rotating Gallery
- Loading branch information
Showing
10 changed files
with
65 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.
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,19 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>CSS 3D Rotating Image Gallery</title> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
</head> | ||
<body> | ||
<div class="box"> | ||
<span id="img1" style="--i:1;"><img src="images/img1.jpg"></span> | ||
<span style="--i:2;"><img src="images/img2.jpg"></span> | ||
<span style="--i:3;"><img src="images/img3.jpg"></span> | ||
<span style="--i:4;"><img src="images/img4.jpg"></span> | ||
<span style="--i:5;"><img src="images/img6.jpg"></span> | ||
<span style="--i:6;"><img src="images/img5.jpg"></span> | ||
<span style="--i:7;"><img src="images/img7.jpg"></span> | ||
<span style="--i:8;"><img src="images/img8.jpg"></span> | ||
</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,46 @@ | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
box-sizing : border-box; | ||
} | ||
body{ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
background: #000; | ||
} | ||
.box{ | ||
position: relative; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
animation: animate 20s linear infinite; | ||
} | ||
@keyframes animate { | ||
0%{ | ||
transform: perspective(1000px) rotateY(0deg); | ||
} | ||
100%{ | ||
transform: perspective(1000px) rotateY(360deg); | ||
} | ||
} | ||
.box span{ | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transform-origin: center; | ||
transform-style: preserve-3d; | ||
transform: rotateY(calc(var(--i) * 45deg)) translateZ(400px); | ||
-webkit-box-reflect: below 0px linear-gradient(transparent, transparent, #0004); | ||
} | ||
.box span img{ | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} |