-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Your commit message * Adding my animation !!! * Adding my animation !!! --------- Co-authored-by: Laureline Paris <32878345+LaurelineP@users.noreply.github.com>
- Loading branch information
1 parent
b8560e8
commit 798daec
Showing
3 changed files
with
273 additions
and
0 deletions.
There are no files selected for viewing
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,74 @@ | ||
<!DOCTYPE html> | ||
<html lang="he"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>סביבון תלת-ממדי</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<div class="text"> | ||
סביבון סוב סוב סוב חנוכה הוא חג טוב | ||
</div> | ||
<div class="dreidel-container"> | ||
|
||
<!-- פאות הסביבון --> | ||
<div class="dreidel-face front"> | ||
<div class="face"> | ||
<div class="eyes"> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
</div> | ||
<div class="smile"></div> | ||
</div>נ</div> | ||
<div class="dreidel-face back"> | ||
<div class="face"> | ||
<div class="eyes"> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
</div> | ||
<div class="smile"></div> | ||
</div>ש</div> | ||
<div class="dreidel-face left">ג | ||
<div class="face"> | ||
<div class="eyes"> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
</div> | ||
<div class="smile"></div> | ||
</div> | ||
</div> | ||
<div class="dreidel-face right">ה | ||
<div class="face"> | ||
<div class="eyes"> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
<div class="eye-to"> | ||
<div class="eye"></div> | ||
</div> | ||
</div> | ||
<div class="smile"></div> | ||
</div> | ||
</div> | ||
<div class="dreidel-face top"></div> | ||
<div class="dreidel-face bottom"></div> | ||
<!-- החוד בתחתית --> | ||
<div class="dreidel-point"></div> | ||
<!-- המקל למעלה --> | ||
<div class="dreidel-stick"></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,4 @@ | ||
{ | ||
"artName": "Dreidel", | ||
"githubHandle": "RikyShafer" | ||
} |
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,195 @@ | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
margin: 0; | ||
background-color: #282c34; | ||
perspective: 1000px; /* מוסיף עומק לתלת ממד */ | ||
flex-direction: column; /* מסדר את התוכן בצורה אנכית */ | ||
} | ||
|
||
.dreidel-container { | ||
position: relative; | ||
width: 150px; | ||
height: 150px; | ||
transform-style: preserve-3d; | ||
animation: spin 4s infinite linear; | ||
transform-origin: bottom center; /* קובע את נקודת הסיבוב על השפיץ */ | ||
margin-bottom: 50px; /* מקום בין הסביבון לכיתוב */ | ||
} | ||
|
||
.dreidel-face { | ||
position: absolute; | ||
width: 150px; | ||
height: 150px; | ||
background: linear-gradient(to bottom, #ffcc00, #ff9900); | ||
border: 4px solid #ffd700; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
font-family: "Arial", sans-serif; | ||
font-size: 36px; | ||
font-weight: bold; | ||
color: #000; | ||
text-shadow: 2px 2px 4px #ffd700; | ||
} | ||
|
||
/* מיקום כל אחת מהפאות של הקוביה */ | ||
.front { | ||
transform: rotateY(0deg) translateZ(75px); | ||
} | ||
|
||
.back { | ||
transform: rotateY(180deg) translateZ(75px); | ||
} | ||
|
||
.left { | ||
transform: rotateY(-90deg) translateZ(75px); | ||
} | ||
|
||
.right { | ||
transform: rotateY(90deg) translateZ(75px); | ||
} | ||
|
||
.top { | ||
transform: rotateX(90deg) translateZ(75px); | ||
} | ||
|
||
.bottom { | ||
transform: rotateX(-90deg) translateZ(75px); | ||
} | ||
|
||
/* החוד התחתון */ | ||
.dreidel-point { | ||
position: absolute; | ||
bottom: -75px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: 0; | ||
height: 0; | ||
border-left: 75px solid transparent; | ||
border-right: 75px solid transparent; | ||
border-top: 150px solid #ff9900; | ||
} | ||
|
||
/* המקל העליון */ | ||
.dreidel-stick { | ||
position: absolute; | ||
top: -50px; | ||
left: 50%; | ||
transform: translateX(-50%); | ||
width: 20px; | ||
height: 50px; | ||
background: linear-gradient(to bottom, #ffcc00, #ff9900); | ||
border-radius: 10px; | ||
box-shadow: 0 0 10px rgba(255, 223, 0, 0.8); | ||
} | ||
|
||
/* אנימציית סיבוב */ | ||
@keyframes spin { | ||
0% { | ||
transform: rotateY(0deg); | ||
} | ||
25% { | ||
transform: rotateY(90deg); | ||
} | ||
50% { | ||
transform: rotateY(180deg); | ||
} | ||
75% { | ||
transform: rotateY(270deg); | ||
} | ||
100% { | ||
transform: rotateY(360deg); | ||
} | ||
} | ||
|
||
/* כיתוב קבוע מעל הסביבון */ | ||
.text { | ||
font-family: "Arial", sans-serif; | ||
font-size: 30px; | ||
color: #ffd700; | ||
text-align: center; | ||
text-shadow: 2px 2px 4px #000; | ||
white-space: nowrap; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
position: absolute; | ||
top: -100px; | ||
transform: rotate(-20deg); /* נותן כיוון עגול לכיתוב */ | ||
} | ||
.face { | ||
position: absolute; | ||
top: 10%; | ||
left: 50%; | ||
transform: translate(-50%, -30%); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
} | ||
|
||
.eyes { | ||
display: flex; | ||
} | ||
|
||
|
||
.eye-to { | ||
position: relative; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 20px; | ||
height: 20px; | ||
background-color: white; | ||
border-radius: 50%; | ||
margin: 5px; | ||
} | ||
|
||
.eye { | ||
position: absolute; | ||
width: 10px; | ||
height: 10px; | ||
background-color: black; | ||
border-radius: 50%; | ||
animation: move-eye 2s infinite alternate ease-in-out; | ||
} | ||
|
||
@keyframes move-eye { | ||
0% { | ||
transform: translate(5px, 0); | ||
/* יזוז ימינה */ | ||
} | ||
|
||
25% { | ||
transform: translate(0, -5px); | ||
/* למעלה */ | ||
} | ||
|
||
50% { | ||
transform: translate(-5px, 0); | ||
/* שמאלה */ | ||
} | ||
|
||
75% { | ||
transform: translate(0, 5px); | ||
/* למטה */ | ||
} | ||
|
||
100% { | ||
transform: translate(5px, 0); | ||
/* חזרה לימינה */ | ||
} | ||
} | ||
|
||
.smile { | ||
width: 25px; | ||
height: 11px; | ||
border: 2px solid #000; | ||
border-top: none; | ||
border-radius: 1px 0 20px 16px; | ||
/* margin-top: 5px; */ | ||
|
||
} |