-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Sophia Brandt <16630701+sophiabrandt@users.noreply.github.com>
- Loading branch information
1 parent
5be0b11
commit 18cd04b
Showing
4 changed files
with
79 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.
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<title>Card Flip</title> | ||
<head> | ||
<link rel="stylesheet" type="text/css" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="object"> | ||
<div class="card"> | ||
<div class="front-side"></div> | ||
<div class="back-side"></div> | ||
</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,55 @@ | ||
html, body { | ||
height: 100%; | ||
background: #000; | ||
margin: 0; | ||
overflow: hidden; | ||
} | ||
|
||
.container { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.object { | ||
width: 300px; | ||
height: 420px; | ||
position: relative; | ||
animation: flip 2s alternate infinite ease-in-out; | ||
transform-style: preserve-3d; | ||
} | ||
|
||
.card { | ||
width: 300px; | ||
height: 420px; | ||
position: absolute; | ||
transform-style: preserve-3d; | ||
animation: flip 2s alternate infinite ease-in-out; | ||
backface-visibility: hidden; | ||
} | ||
|
||
@keyframes flip { | ||
0% { transform: rotateY(0deg); } | ||
100% { transform: rotateY(180deg); } | ||
} | ||
|
||
.front-side { | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
backface-visibility: hidden; | ||
background: #3498db; /* Blue color on the front side */ | ||
transform: rotateY(0deg); | ||
} | ||
|
||
.back-side { | ||
width: 100%; | ||
height: 100%; | ||
position: absolute; | ||
backface-visibility: hidden; | ||
background: #FF5733; /* Red color on the back side */ | ||
transform: rotateY(180deg); | ||
} | ||
|
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