Created
November 3, 2018 05:48
-
-
Save CreatiCoding/02e7e30f4288a775a53ea438a5742588 to your computer and use it in GitHub Desktop.
FEConf CSS Animation Rocket Intro with scene.js
This file contains hidden or 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
| <div class="wrapper"> | |
| <div class="rocket"> | |
| <div class="r body left"> | |
| <div class="shoot"> | |
| </div> | |
| <div class="flames center-x-b"> | |
| <div class="flame flame1"></div> | |
| <div class="flame flame2"></div> | |
| <div class="flame flame3"></div> | |
| <div class="flame flame4"></div> | |
| <div class="flame flame5"></div> | |
| </div> | |
| </div> | |
| <div class="r body center center-x"> | |
| <div class="shoot"></div> | |
| </div> | |
| <div class="r body right"> | |
| <div class="shoot"> | |
| </div> | |
| <div class="flames center-x-b"> | |
| <div class="flame flame1"></div> | |
| <div class="flame flame2"></div> | |
| <div class="flame flame3"></div> | |
| <div class="flame flame4"></div> | |
| <div class="flame flame5"></div> | |
| </div> | |
| </div> | |
| <div class="spaceship center-x"> | |
| <div class="top"> | |
| <div class="line center-x center-x-b"></div> | |
| </div> | |
| <div class="bottom center-x"></div> | |
| <div class="wing center-x center-x-b"> | |
| <div class="bottom center-x-b center-x-a"> | |
| </div> | |
| <div class="line left"></div> | |
| <div class="line right"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="page page1"> | |
| <div class="pedestal left"> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| </div> | |
| <div class="pedestal right"> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| <div class="block"></div> | |
| </div> | |
| <div class="dusts dusts1"> | |
| <div class="dust dust1"></div> | |
| <div class="dust dust2"></div> | |
| <div class="dust dust3"></div> | |
| <div class="dust dust4"></div> | |
| <div class="dust dust5"></div> | |
| <div class="dust dust6"></div> | |
| <div class="dust dust7"></div> | |
| <div class="dust dust8"></div> | |
| <div class="dust dust9"></div> | |
| <div class="dust dust10"></div> | |
| </div> | |
| <div class="dusts dusts2"> | |
| <div class="dust dust1"></div> | |
| <div class="dust dust2"></div> | |
| <div class="dust dust3"></div> | |
| <div class="dust dust4"></div> | |
| <div class="dust dust5"></div> | |
| <div class="dust dust6"></div> | |
| <div class="dust dust7"></div> | |
| <div class="dust dust8"></div> | |
| <div class="dust dust9"></div> | |
| <div class="dust dust10"></div> | |
| </div> | |
| <div class="dusts dusts3"> | |
| <div class="dust dust1"></div> | |
| <div class="dust dust2"></div> | |
| <div class="dust dust3"></div> | |
| <div class="dust dust4"></div> | |
| <div class="dust dust5"></div> | |
| <div class="dust dust6"></div> | |
| <div class="dust dust7"></div> | |
| <div class="dust dust8"></div> | |
| <div class="dust dust9"></div> | |
| <div class="dust dust10"></div> | |
| </div> | |
| <div class="dusts dusts4"> | |
| <div class="dust dust1"></div> | |
| <div class="dust dust2"></div> | |
| <div class="dust dust3"></div> | |
| <div class="dust dust4"></div> | |
| <div class="dust dust5"></div> | |
| <div class="dust dust6"></div> | |
| <div class="dust dust7"></div> | |
| <div class="dust dust8"></div> | |
| <div class="dust dust9"></div> | |
| <div class="dust dust10"></div> | |
| </div> | |
| <div class="star star1"></div> | |
| <div class="star star2"></div> | |
| <div class="star star3"></div> | |
| <div class="star star4"></div> | |
| <div class="moon"></div> | |
| </div> | |
| <div class="page page2"> | |
| <div class="earth"> | |
| <div class="forest forest1"></div> | |
| <div class="forest forest2"></div> | |
| <div class="forest forest3"></div> | |
| <div class="forest forest4"></div> | |
| <div class="forest forest5"></div> | |
| <div class="cloud cloud1"></div> | |
| <div class="cloud cloud2"></div> | |
| <div class="cloud cloud3"></div> | |
| <div class="cloud cloud4"></div> | |
| <div class="cloud cloud5"></div> | |
| </div> | |
| <div class="planet planet1"></div> | |
| <div class="planet planet2"></div> | |
| <div class="planet planet3"></div> | |
| <div class="planet planet4"></div> | |
| <div class="planet planet5"></div> | |
| <div class="planet planet6"></div> | |
| <div class="planet planet7"></div> | |
| <div class="planet planet8"></div> | |
| <div class="planet planet9"></div> | |
| <div class="star star1"></div> | |
| <div class="star star2"></div> | |
| <div class="star star3"></div> | |
| <div class="star star4"></div> | |
| </div> | |
| <div class="page page3"> | |
| <div class="planet planet10">HTML</div> | |
| <div class="planet planet11">Javascript</div> | |
| <div class="planet planet12">React</div> | |
| <div class="planet planet13">Angular</div> | |
| <div class="planet planet14">Vue</div> | |
| <div class="planet planet15"> | |
| <span class="title1">CSS</span><span class="title2"> Motion <span class="title3"> Graphic</span></span><span class="title4">Daybrush</span> | |
| <div class="background"></div> | |
| </div> | |
| </div> | |
| </div> |
This file contains hidden or 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
| const stars = document.querySelectorAll(".star"); | |
| Array.prototype.slice.call(stars).forEach(star => star.appendChild(ShapePoly.poly({starRadius: 50, width: "100px", stroke: "#eeeeaa", strokeWidth: "2px", side: 5}))); | |
| function dust(from, to) { | |
| return { | |
| 0: { | |
| ...from, | |
| opacity: 0, | |
| }, | |
| 0.2: { | |
| opacity: 1, | |
| }, | |
| 0.6: { | |
| opacity: 1, | |
| }, | |
| 0.8: { | |
| ...to, | |
| opacity: 0, | |
| }, | |
| }; | |
| } | |
| function shake(time) { | |
| return { | |
| [time]: { | |
| transform: "translateX(0px) translateY(0px)", | |
| }, | |
| [time + 0.2]: { | |
| transform: "translateX(2px) translateY(0px)", | |
| }, | |
| [time + 0.4]: { | |
| transform: "translateX(0px) translateY(2px)", | |
| }, | |
| [time + 0.6]: { | |
| transform: "translateX(-2px) translateY(0px)", | |
| }, | |
| [time + 0.8]: { | |
| transform: "translateX(0px) translateY(-2px)", | |
| }, | |
| }; | |
| } | |
| const dust1 = dust({left: "100px", bottom: "-10px"}, {left: "0px"}); | |
| const dust2 = dust({left: "100px", bottom: "5px", transform: "rotate(0deg) translateX(0px) "}, {left: "0px", transform: "rotate(60deg) translateX(-20px)"}); | |
| const dustIterationCount = 2; | |
| var scene = new Scene({ | |
| ".page1": { | |
| 7: { | |
| top: "0%", | |
| }, | |
| "7>": { | |
| top: "100%", | |
| }, | |
| }, | |
| ".rocket": { | |
| 0: { | |
| transform: "translateZ(0px) translate2(-50%, 50%) translate(0px, -165px)", | |
| }, | |
| 4: { | |
| transform: "scale(1) translate(0px, -1500px) rotate(0deg)", | |
| bottom: "0%", | |
| left: "50%", | |
| }, | |
| "4>": { | |
| transform: "scale(0) translate(0px, -50px) rotate(70deg)", | |
| left: "17%", | |
| bottom: "40%", | |
| }, | |
| "8": { | |
| bottom: "80%", | |
| transform: "translateY(0px)", | |
| }, | |
| "13": { | |
| transform: "translate(0px, 0px) scale(0.6) rotate(120deg) translateX(0px) translateY(-200px)", | |
| left: "110%", | |
| bottom: "45%", | |
| }, | |
| "13>": { | |
| transform: "translate(0px, 0px) rotate(90deg) translateY(0px)", | |
| left: "0%", | |
| bottom: "50%", | |
| }, | |
| "14.9": { | |
| transform: "translate(150px, 0px)", | |
| }, | |
| ...shake(15), | |
| ...shake(16), | |
| ...shake(17), | |
| ...shake(18), | |
| ...shake(19), | |
| 20: { | |
| left: "0%", | |
| transform: "translate(150px, 0px)", | |
| }, | |
| "25": { | |
| transform: "translate(0px, 0px)", | |
| left: "50%", | |
| }, | |
| options: { | |
| delay: 4, | |
| } | |
| }, | |
| ".flame2": Scene.fadeIn({duration: 0.7, delay: 4}), | |
| ".flame3": Scene.fadeIn({duration: 0.7, delay: 4.3}), | |
| ".flame4": Scene.fadeIn({duration: 0.7, delay: 4.6}), | |
| ".flame5": Scene.fadeIn({duration: 0.7, delay: 4.9}), | |
| ".flames:before": Scene.fadeOut({duration: 0.3, delay: 4.9}), | |
| ".dust1" : {...dust({left: "100px"}, {left: "0px"}), options: {delay: 3, iterationCount: dustIterationCount}}, | |
| ".dust2" : {...dust1, options: {delay: 3.2, iterationCount: dustIterationCount}}, | |
| ".dust3" : {...dust1, options: {delay: 3.4, iterationCount: dustIterationCount}}, | |
| ".dust4" : {...dust1, options: {delay: 3.6, iterationCount: dustIterationCount}}, | |
| ".dust5" : {...dust1, options: {delay: 3.8, iterationCount: dustIterationCount}}, | |
| ".dust6" : {...dust2, options: {delay: 3, iterationCount: dustIterationCount}}, | |
| ".dust7" : {...dust2, options: {delay: 3.2, iterationCount: dustIterationCount}}, | |
| ".dust8" : {...dust2, options: {delay: 3.4, iterationCount: dustIterationCount}}, | |
| ".dust9" : {...dust2, options: {delay: 3.6, iterationCount: dustIterationCount}}, | |
| ".dust10" : {...dust2, options: {delay: 3.8, iterationCount: dustIterationCount}}, | |
| ".page1 .star1" : Scene.zoomIn({duration: 1, delay: 0}), | |
| ".page1 .star2" : Scene.zoomIn({duration: 1, delay: 0.2}), | |
| ".page1 .star3" : Scene.zoomIn({duration: 1, delay: 0.6}), | |
| ".page1 .star4" : Scene.zoomIn({duration: 1, delay: 0.4}), | |
| ".moon": { | |
| 0: { | |
| transform: "translateX(0px) rotate(-50deg)", | |
| opacity: 0, | |
| }, | |
| 0.5: { | |
| "box-shadow": "inset -10px -10px var(--white)", | |
| }, | |
| 1.5: { | |
| opacity: 1, | |
| }, | |
| 2: { | |
| transform: "translateX(100px) rotate(0deg)", | |
| "box-shadow": "inset -110px -110px var(--white)", | |
| }, | |
| options: { | |
| delay: 0.3, | |
| easing: Scene.EASE_IN_OUT, | |
| } | |
| }, | |
| ".page2": { | |
| 0: { | |
| top: "100%", | |
| }, | |
| "0>": { | |
| top: "0%", | |
| }, | |
| "10": { | |
| top: "0%", | |
| }, | |
| "10>": { | |
| top: "100%", | |
| }, | |
| options: { | |
| delay: 7, | |
| } | |
| }, | |
| ".page2 .earth": { | |
| 0: { | |
| transform: "scale(0)", | |
| }, | |
| 1: { | |
| transform: "scale(1)", | |
| }, | |
| options: { | |
| delay: 7, | |
| } | |
| }, | |
| ".page2 .planet1": Scene.zoomIn({duration: 1, delay: 7}), | |
| ".page2 .planet2": Scene.zoomIn({duration: 1, delay: 7.2}), | |
| ".page2 .planet3": Scene.zoomIn({duration: 1, delay: 7.4}), | |
| ".page2 .planet4": Scene.zoomIn({duration: 1, delay: 7.6}), | |
| ".page2 .planet5": Scene.zoomIn({duration: 1, delay: 7.8}), | |
| ".page2 .planet6": Scene.zoomIn({duration: 1, delay: 8}), | |
| ".page2 .planet7": Scene.zoomIn({duration: 1, delay: 8.2}), | |
| ".page2 .planet8": Scene.zoomIn({duration: 1, delay: 8.4}), | |
| ".page2 .planet9": Scene.zoomIn({duration: 1, delay: 8.6}), | |
| ".page2 .star1": Scene.zoomIn({duration: 1, delay: 7}), | |
| ".page2 .star2": Scene.zoomIn({duration: 1, delay: 7.4}), | |
| ".page2 .star3": Scene.zoomIn({duration: 1, delay: 7.8}), | |
| ".page2 .star4": Scene.zoomIn({duration: 1, delay: 8.2}), | |
| ".page3": { | |
| 0: { | |
| top: "100%", | |
| }, | |
| "0>": { | |
| top: "0%", | |
| left: "0%", | |
| }, | |
| "10": { | |
| left: "-135%", | |
| }, | |
| options: { | |
| delay: 17, | |
| } | |
| }, | |
| ".page3 .planet10": Scene.zoomIn({duration: 1, delay: 18, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet11": Scene.zoomIn({duration: 1, delay: 19, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet12": Scene.zoomIn({duration: 1, delay: 20, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet13": Scene.zoomIn({duration: 1, delay: 21, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet14": Scene.zoomIn({duration: 1, delay: 22, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet15": Scene.zoomIn({duration: 1, delay: 23, easing: Scene.bezier(.74,0,.42,1.47)}), | |
| ".page3 .planet15 .background": Scene.zoomIn({duration: 2, to: 50, delay: 26.8}), | |
| ".page3 .planet15 .title1": { | |
| 0: { | |
| transform: "translateX(0px)", | |
| }, | |
| 1.5: { | |
| transform: "translateX(-150px)", | |
| }, | |
| options: { | |
| delay: 28, | |
| } | |
| }, | |
| ".page3 .planet15 .title2": { | |
| 0: { | |
| transform: "translateX(0px)", | |
| }, | |
| 1.5: { | |
| transform: "translateX(-150px)", | |
| }, | |
| 2: { | |
| transform: "translateX(-150px)", | |
| opacity: 0, | |
| }, | |
| 3: { | |
| opacity: 1, | |
| }, | |
| options: { | |
| delay: 28, | |
| } | |
| }, | |
| ".page3 .planet15 .title3": { | |
| 2.5: { | |
| opacity: 0, | |
| }, | |
| 3.5: { | |
| opacity: 1, | |
| }, | |
| 10: {}, | |
| options: { | |
| delay: 28, | |
| } | |
| }, | |
| ".page3 .planet15 .title4": { | |
| 3: { | |
| transform: "translate(-130px, 40px)", | |
| opacity: 0, | |
| }, | |
| 4: { | |
| opacity: 1, | |
| }, | |
| options: { | |
| delay: 28, | |
| } | |
| }, | |
| }, { | |
| selector: true, | |
| delay: 2, | |
| easing: Scene.EASE_IN_OUT, | |
| iterationCount: "infinite", | |
| }).playCSS(); |
This file contains hidden or 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
| <script src="//daybrush.com/shape-svg/release/latest/shapesvg.js"></script> | |
| <script src="//daybrush.com/shape-poly/release/latest/shapepoly.js"></script> | |
| <script src="//daybrush.github.io/scenejs/release/latest/scene.js"></script> |
This file contains hidden or 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
| html, body { | |
| position: relative; | |
| height: 100%; | |
| } | |
| body { | |
| font-family: sans-serif; | |
| background: #363440; | |
| --black: #333; | |
| --white: #f5f5f5; | |
| overflow: hidden; | |
| } | |
| .wrapper { | |
| position: relative; | |
| width: 100%; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .center-x, .center-x-b:before, .center-x-a:after { | |
| left: -100px; | |
| right: -100px; | |
| margin-left: auto; | |
| margin-right: auto; | |
| } | |
| .center-y, .center-y-b:before, .center-y-a:after { | |
| top: -100px; | |
| bottom: -100px; | |
| margin-top: auto; | |
| margin-bottom: auto; | |
| } | |
| body *, :before, :after { | |
| position: absolute; | |
| } | |
| .pedestal { | |
| position: absolute; | |
| width: 50px; | |
| height: 200px; | |
| border: 6px solid #ccc; | |
| border-bottom: none; | |
| /* border-radius: 10px 10px 0px 0px; */ | |
| bottom: 0; | |
| } | |
| .pedestal.left { | |
| left: 50%; | |
| margin-left: 70px; | |
| } | |
| .pedestal.right { | |
| right: 50%; | |
| margin-right: 70px; | |
| } | |
| .pedestal .block { | |
| position: relative; | |
| width: 100%; | |
| height: 50px; | |
| border-bottom: 6px solid #ccc; | |
| } | |
| .pedestal .block:before, .pedestal .block:after { | |
| content: ""; | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| width: 70px; | |
| background: #ccc; | |
| height: 6px; | |
| } | |
| .pedestal .block:before { | |
| transform: translate(-50%, -50%) rotate(45deg); | |
| } | |
| .pedestal .block:after { | |
| transform: translate(-50%, -50%) rotate(-45deg); | |
| } | |
| .rocket { | |
| position: absolute; | |
| width: 190px; | |
| height: 250px; | |
| z-index: 2; | |
| left: 50%; | |
| bottom: 0%; | |
| transform: translate(-50%, 50%) translate(0px, -165px); | |
| } | |
| .r.body { | |
| position: absolute; | |
| background: #F0D878; | |
| width: 50px; | |
| height: 150px; | |
| bottom: 0; | |
| transform: scale(1); | |
| } | |
| .r.body:before { | |
| position: absolute; | |
| content: ""; | |
| width: 10px; | |
| border-bottom: 40px solid #F0D878; | |
| border-left: 20px solid transparent; | |
| border-right: 20px solid transparent; | |
| bottom: 100%; | |
| transform: scale(1); | |
| } | |
| .r.body:after { | |
| position: absolute; | |
| content: ""; | |
| width: 20px; | |
| border-top: 15px solid #F0D878; | |
| border-left: 15px solid transparent; | |
| border-right: 15px solid transparent; | |
| top: 100%; | |
| transform: scale(1); | |
| } | |
| .r.body.left, .r.body.right { | |
| bottom: -10px; | |
| } | |
| .r.body.left { | |
| left: 0; | |
| } | |
| .r.body.right { | |
| right: 0; | |
| } | |
| .r.body.center { | |
| background: #C35749; | |
| width: 90px; | |
| height: 180px; | |
| z-index: 1; | |
| } | |
| .r.body.center:before { | |
| border-left-width: 40px; | |
| border-right-width: 40px; | |
| border-bottom: 60px solid #C35749; | |
| } | |
| .r.body.center:after { | |
| border-left-width: 30px; | |
| border-right-width: 30px; | |
| border-top: 20px solid #C35749; | |
| } | |
| .r.body .shoot { | |
| position: absolute; | |
| top: 100%; | |
| width: 60px; | |
| border-bottom: 30px solid #403e3f; | |
| border-left: 10px solid transparent; | |
| border-right: 10px solid transparent; | |
| left: 50%; | |
| transform: translateX(-50%); | |
| } | |
| .r.body.left .shoot, .r.body.right .shoot { | |
| width: 30px; | |
| border-bottom: 30px solid #BCBEC0; | |
| } | |
| .r.body .flames:before { | |
| content: ""; | |
| top: 30px; | |
| width: 20px; | |
| height: 200px; | |
| background: var(--white); | |
| z-index: -1; | |
| } | |
| .r.body .flames { | |
| top: 100%; | |
| margin-top: 25px; | |
| width: 100%; | |
| z-index: -1; | |
| transform: scale(1); | |
| -webkit-backface-visibility: hidden; | |
| } | |
| .r.body .flames .flame { | |
| top: 0px; | |
| left: 50%; | |
| width: 30px; | |
| height: 30px; | |
| border-radius: 0% 100%; | |
| background: var(--white); | |
| transform-origin: 0px 0px; | |
| transform: translateZ(0) rotate(45deg); | |
| z-index: -1; | |
| -webkit-backface-visibility: hidden; | |
| } | |
| .r.body .flame.flame1 { | |
| z-index: 5; | |
| } | |
| .r.body .flame.flame2 { | |
| width: 40px; | |
| height: 40px; | |
| top: -2px; | |
| background: #EFAD83; | |
| z-index: 4; | |
| } | |
| .r.body .flame.flame3 { | |
| width: 50px; | |
| height: 50px; | |
| top: -3px; | |
| background: #EE7B46; | |
| z-index: 3; | |
| } | |
| .r.body .flame.flame4 { | |
| width: 60px; | |
| height: 60px; | |
| top: -5px; | |
| background: #BC734B; | |
| z-index: 2; | |
| } | |
| .r.body .flame.flame5 { | |
| width: 70px; | |
| height: 70px; | |
| top: -6px; | |
| background: #B27A5C; | |
| z-index: 1; | |
| } | |
| .spaceship { | |
| position: absolute; | |
| width: 70px; | |
| height: 130px; | |
| top: 120px; | |
| background: #f5f5f5; | |
| z-index: 2; | |
| } | |
| .spaceship:before { | |
| position: absolute; | |
| content: ""; | |
| width: 6px; | |
| border-left: 32px solid transparent; | |
| border-right: 32px solid transparent; | |
| border-bottom: 50px solid #f5f5f5; | |
| bottom: 100%; | |
| } | |
| .spaceship .top { | |
| width: 8px; | |
| border-left: 19.6px solid transparent; | |
| border-right: 19.6px solid transparent; | |
| border-bottom: 30px solid var(--black); | |
| left: 0; | |
| right: 0; | |
| margin: auto; | |
| top: -50px; | |
| } | |
| .spaceship .top:before { | |
| content: ""; | |
| width: 20px; | |
| border-left: 13px solid transparent; | |
| border-right: 13px solid transparent; | |
| border-top: 6px solid var(--black); | |
| top: 30px; | |
| left: -30px; | |
| right: -30px; | |
| margin: auto; | |
| } | |
| .spaceship .top:after { | |
| content: ""; | |
| top: 50px; | |
| width: 100px | |
| } | |
| .spaceship .top .line { | |
| width: 50px; | |
| height: 30px; | |
| overflow: hidden; | |
| top: 50px; | |
| } | |
| .spaceship .top .line:before { | |
| content: ""; | |
| width: 60px; | |
| height: 15px; | |
| border: 12px solid var(--black); | |
| border-bottom: 0; | |
| border-radius: 50% / 100% 100% 0px 0px; | |
| } | |
| .spaceship>.bottom { | |
| bottom: -30px; | |
| height: 50px; | |
| width: 8px; | |
| background: var(--black); | |
| z-index: 2; | |
| } | |
| .spaceship>.bottom:before, .spaceship>.bottom:after { | |
| content: ""; | |
| bottom: 0px; | |
| height: 20px; | |
| width: 8px; | |
| background: #444; | |
| } | |
| .spaceship>.bottom:before { | |
| left: -50px; | |
| } | |
| .spaceship>.bottom:after { | |
| right: -50px; | |
| } | |
| .spaceship .wing { | |
| top: calc(100% - 1px); | |
| width: 170px; | |
| height: 70px; | |
| top: 80%; | |
| } | |
| .spaceship .wing .bottom { | |
| width: 100%; | |
| height: 100%; | |
| overflow: hidden; | |
| } | |
| .spaceship .wing .triangle { | |
| width: 100%; | |
| bottom: 0; | |
| } | |
| .spaceship .wing .bottom:before{ | |
| content: ""; | |
| width: 66px; | |
| top: -1px; | |
| border-bottom: 60px solid var(--white); | |
| border-left: 50px solid transparent; | |
| border-right: 50px solid transparent; | |
| } | |
| .wing .line { | |
| width: 8px; | |
| height: 60px; | |
| background: var(--black); | |
| bottom: 100%; | |
| border-radius: 4px 4px 0px 0px; | |
| } | |
| .wing .line:before { | |
| content: ""; | |
| width: 100%; | |
| height: 80px; | |
| background: inherit; | |
| transform-origin: 50% 4px; | |
| top: calc(100% - 4px); | |
| border-radius: 4px; | |
| } | |
| .wing .line.left { | |
| left: 50%; | |
| margin-left: -38px; | |
| } | |
| .wing .line.right { | |
| right: 50%; | |
| margin-right: -38px; | |
| } | |
| .wing .line.left:before { | |
| transform: rotate(40deg); | |
| } | |
| .wing .line.right:before { | |
| transform: rotate(-40deg); | |
| } | |
| .wing .bottom:after { | |
| content: ""; | |
| top: 52px; | |
| width: 170px; | |
| height: 8px; | |
| border-radius: 4px; | |
| background: var(--black); | |
| } | |
| .dusts { | |
| bottom: 0; | |
| height: 100px; | |
| width: 100px; | |
| transform-origin: 100% 50%; | |
| } | |
| .dust { | |
| border-radius: 50%; | |
| width: 30px; | |
| height: 30px; | |
| background: var(--white); | |
| bottom: 0; | |
| } | |
| .dusts1, .dusts2 { | |
| right: 50%; | |
| margin-right: 70px; | |
| } | |
| .dusts3, .dusts4 { | |
| left: 50%; | |
| margin-left: -30px; | |
| } | |
| .dusts2, .dusts4 { | |
| transform: scale(-1, 1); | |
| } | |
| .star { | |
| width: 20px; | |
| } | |
| .star1 { | |
| left: 10%; | |
| top: 20%; | |
| } | |
| .star2 { | |
| left: 20%; | |
| top: 40%; | |
| } | |
| .star3 { | |
| left: 60%; | |
| top: 30%; | |
| } | |
| .star4 { | |
| left: 80%; | |
| top: 50%; | |
| } | |
| .page2 .star1 { | |
| left: 10%; | |
| top: 40%; | |
| } | |
| .page2 .star2 { | |
| left: 40%; | |
| top: 70%; | |
| } | |
| .page2 .star3 { | |
| left: 70%; | |
| top: 40%; | |
| } | |
| .page2 .star4 { | |
| left: 90%; | |
| top: 70%; | |
| } | |
| .moon { | |
| top: 50px; | |
| right: 150px; | |
| width: 100px; | |
| height: 100px; | |
| background: #363440; | |
| border-radius: 50%; | |
| box-shadow: inset -20px -20px var(--white); | |
| border: 1px solid #363440; | |
| box-sizing: border-box; | |
| -webkit-backface-visibility: hidden; | |
| outline: 1px solid transparent; | |
| overflow: hidden; | |
| } | |
| .page { | |
| position: absolute; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| .earth { | |
| width: 100px; | |
| height: 100px; | |
| bottom: 40%; | |
| left: 15%; | |
| border-radius: 50%; | |
| background: #4170ba; | |
| } | |
| .earth .forest { | |
| width: 30px; | |
| height: 10px; | |
| border-radius: 5px; | |
| background: #25bd5b; | |
| opacity: 0.5; | |
| } | |
| .earth .forest1 { | |
| left: 30%; | |
| } | |
| .earth .forest2 { | |
| top: 30%; | |
| left: 10%; | |
| } | |
| .earth .forest3 { | |
| top: 50%; | |
| left: 60%; | |
| } | |
| .earth .forest4 { | |
| top: 70%; | |
| left: 70%; | |
| } | |
| .earth .forest5 { | |
| top: 70%; | |
| left: 10%; | |
| } | |
| .earth .cloud { | |
| width: 40px; | |
| height: 10px; | |
| border-radius: 5px; | |
| background: var(--white); | |
| opacity: 0.5; | |
| } | |
| .earth .cloud1 { | |
| top: 10%; | |
| left: 10%; | |
| } | |
| .earth .cloud2 { | |
| top: 20%; | |
| left: 60%; | |
| } | |
| .earth .cloud3 { | |
| top: 40%; | |
| left: 30%; | |
| } | |
| .earth .cloud4 { | |
| top: 60%; | |
| left: 10%; | |
| } | |
| .earth .cloud5 { | |
| top: 80%; | |
| left: 50%; | |
| } | |
| .planet { | |
| background: var(--white); | |
| width: 15px; | |
| height: 15px; | |
| border-radius: 50%; | |
| } | |
| .planet1 { | |
| top: 10%; | |
| left: 10%; | |
| } | |
| .planet2 { | |
| top: 30%; | |
| left: 30%; | |
| width: 20px; | |
| height: 20px; | |
| } | |
| .planet3 { | |
| top: 60%; | |
| left: 60%; | |
| width: 30px; | |
| height: 30px; | |
| } | |
| .planet4 { | |
| top: 20%; | |
| left: 45%; | |
| } | |
| .planet5 { | |
| top:70%; | |
| left: 40%; | |
| } | |
| .planet6 { | |
| top: 80%; | |
| left: 20%; | |
| } | |
| .planet7 { | |
| left: 80%; | |
| top: 15%; | |
| } | |
| .planet8 { | |
| left: 90%; | |
| top: 80%; | |
| } | |
| .planet9 { | |
| left: 60%; | |
| top: 10%; | |
| } | |
| .page2 .star2 { | |
| left: 50%; | |
| } | |
| .page2 .star4 { | |
| top: 30%; | |
| } | |
| .page3 .planet { | |
| width: 150px; | |
| height: 150px; | |
| line-height: 150px; | |
| text-align: center; | |
| font-size: 30px; | |
| font-weight: bold; | |
| } | |
| .page3 .planet:nth-child(2n) { | |
| bottom: 15%; | |
| } | |
| .page3 .planet:nth-child(2n + 1) { | |
| top: 15%; | |
| } | |
| .planet10 { | |
| left: 30%; | |
| } | |
| .planet11 { | |
| left: 60%; | |
| } | |
| .planet12 { | |
| left: 90%; | |
| } | |
| .planet13 { | |
| left: 120%; | |
| } | |
| .planet14 { | |
| left: 150%; | |
| } | |
| .page3 .planet.planet15 { | |
| top: 0%; | |
| bottom: 0%; | |
| left: 180%; | |
| margin: auto 0px; | |
| z-index: 10; | |
| } | |
| .page3 .planet15 .background { | |
| position: absolute; | |
| border-radius: 50%; | |
| background: var(--white); | |
| width: 180px; | |
| height: 180px; | |
| left: 0%; | |
| top: 0%; | |
| bottom: 0%; | |
| top: 0%; | |
| margin: auto; | |
| } | |
| .page3 .planet15 .title1 { | |
| position: relative; | |
| display: inline-block; | |
| z-index: 2; | |
| } | |
| .page3 .planet15 .title2 { | |
| position: absolute; | |
| white-space: nowrap; | |
| z-index: 2; | |
| } | |
| .page3 .planet15 .title3 { | |
| display: inline-block; | |
| } | |
| .page3 .planet15 .title4 { | |
| position: absolute; | |
| white-space: nowrap; | |
| z-index: 2; | |
| } | |
| .page2, .page3 { | |
| top: 100%; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment