Ghost
How do I make an ghost?
Doing a spooky animated pen every day for the month of October.. What is a ghost? How do you make a ghost? This script and codes were developed by Alex Bergin on 12 June 2022, Sunday.
Ghost - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Ghost</title> <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Roboto+Condensed:300,700'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <main> <div class="ghost"> <div class="body"> <div class="bottom"> <li></li> <li></li> <li></li> </div> </div> <div class="head"> <ul class="eyes"> <li> <i></i> </li><li> <i></i> </li> </ul> </div> </div>
</main>
<h1>Ghost</h1>
<nav> <a title="Ghost" class="this" href="http://codepen.io/abergin/pen/JYEvJN/" target="_blank">1</a> <a title="Devil" class="latest" target="_blank" href="http://codepen.io/abergin/pen/RWpPvw/">2</a> <a title="Goblin" target="_blank">3</a> <a title="Vampire" target="_blank">4</a> <a title="Werewolf" target="_blank">5</a> <a title="Pumpkin" target="_blank">6</a> <a title="Haunted House" target="_blank">7</a> <a title="Zombie" target="_blank">8</a> <a title="Eyeball" target="_blank">9</a> <a title="Alien" target="_blank">10</a> <a title="Raven" target="_blank">11</a> <a title="Moon" target="_blank">12</a> <a title="Frankenstein" target="_blank">13</a> <a title="Bat" target="_blank">14</a> <a title="Amulet" target="_blank">15</a> <a title="Grave" target="_blank">16</a> <a title="Demon" target="_blank">17</a> <a title="Mask" target="_blank">18</a> <a title="Creature from the Black Lagoon" target="_blank">19</a> <a title="Skull" target="_blank">20</a> <a title="8-bit Zombie" target="_blank">21</a> <a title="Candy" target="_blank">22</a> <a title="Gore" target="_blank">23</a> <a title="Skeleton" target="_blank">24</a> <a title="Mummy" target="_blank">25</a> <a title="Rat" target="_blank">26</a> <a title="Witch" target="_blank">27</a> <a title="Black Cat" target="_blank">28</a> <a title="Scarecrow" target="_blank">29</a> <a title="Spider" target="_blank">30</a> <a title="Dragon" target="_blank">31</a>
</nav>
<i class="pre"></i>
<i class="post"></i> <script src="js/index.js"></script>
</body>
</html>
Ghost - Script Codes CSS Codes
@-webkit-keyframes bounce { 100% { -webkit-transform: translate(-50%, -10%); transform: translate(-50%, -10%); } 0% { -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }
}
@keyframes bounce { 100% { -webkit-transform: translate(-50%, -10%); transform: translate(-50%, -10%); } 0% { -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }
}
@-webkit-keyframes look { 100% { -webkit-transform: translate(40%, 0); transform: translate(40%, 0); } 60% { -webkit-transform: translate(40%, 0); transform: translate(40%, 0); } 40% { -webkit-transform: translate(-40%, 0); transform: translate(-40%, 0); } 0% { -webkit-transform: translate(-40%, 0); transform: translate(-40%, 0); }
}
@keyframes look { 100% { -webkit-transform: translate(40%, 0); transform: translate(40%, 0); } 60% { -webkit-transform: translate(40%, 0); transform: translate(40%, 0); } 40% { -webkit-transform: translate(-40%, 0); transform: translate(-40%, 0); } 0% { -webkit-transform: translate(-40%, 0); transform: translate(-40%, 0); }
}
.ghost { -webkit-animation: bounce 0.75s ease-in-out 0s infinite alternate none; animation: bounce 0.75s ease-in-out 0s infinite alternate none; position: absolute; text-align: center; font-size: 0; left: 50%; top: 50%; width: 22vw; height: 22vw;
}
@media screen and (orientation: landscape) { .ghost { width: 22vh; height: 22vh; }
}
.ghost .head, .ghost .body { position: absolute; background-color: #f9fcff;
}
.ghost .head { border-radius: 50%; margin: -11vw 0 0 0; width: 22vw; height: 22vw;
}
@media screen and (orientation: landscape) { .ghost .head { margin: -11vh 0 0 0; width: 22vh; height: 22vh; }
}
.ghost .eyes { position: absolute; right: 0; left: 0; top: 50%;
}
.ghost .eyes li { position: absolute; background-color: #182C38; border-radius: 50%; overflow: hidden; margin: -2.2vw 0 0 -2.2vw; width: 4.4vw; height: 4.4vw;
}
@media screen and (orientation: landscape) { .ghost .eyes li { margin: -2.2vh 0 0 -2.2vh; width: 4.4vh; height: 4.4vh; }
}
.ghost .eyes li:nth-of-type(1) { left: 30%;
}
.ghost .eyes li:nth-of-type(2) { left: 70%;
}
.ghost .eyes li i { -webkit-animation: look 2.95s ease-in-out 0s infinite alternate none; animation: look 2.95s ease-in-out 0s infinite alternate none; position: absolute; border-radius: 50%; background-color: #f9fcff; margin-top: -40%; margin-left: -40%; top: 50%; left: 50%; height: 80%; width: 80%;
}
.ghost .body { width: 22vw; height: 16.5vw;
}
@media screen and (orientation: landscape) { .ghost .body { width: 22vh; height: 16.5vh; }
}
.ghost .body .bottom { position: absolute; right: 0; left: 0; top: 16.5vw;
}
@media screen and (orientation: landscape) { .ghost .body .bottom { top: 16.5vh; }
}
.ghost .body .bottom li { position: absolute; top: -1px; border-top: 5.5vw solid #f9fcff;
}
@media screen and (orientation: landscape) { .ghost .body .bottom li { border-top: 5.5vh solid #f9fcff; }
}
.ghost .body .bottom li:nth-of-type(1) { left: 0; border-right: 5.5vw solid transparent;
}
@media screen and (orientation: landscape) { .ghost .body .bottom li:nth-of-type(1) { border-right: 5.5vh solid transparent; }
}
.ghost .body .bottom li:nth-of-type(2) { left: 25%; border-right: 5.5vw solid transparent; border-left: 5.5vw solid transparent;
}
@media screen and (orientation: landscape) { .ghost .body .bottom li:nth-of-type(2) { border-right: 5.5vh solid transparent; border-left: 5.5vh solid transparent; }
}
.ghost .body .bottom li:nth-of-type(3) { right: 0; border-left: 5.5vw solid transparent;
}
@media screen and (orientation: landscape) { .ghost .body .bottom li:nth-of-type(3) { border-left: 5.5vh solid transparent; }
}
html, body, main { background-color: #182C38; font-family: "Roboto Condensed", sans-serif; display: block; position: absolute; overflow: hidden; height: 100%; width: 100%; left: 0; top: 0;
}
h1 { font-weight: 300; color: #fcfeff; position: absolute; text-align: center; letter-spacing: 0.025em; bottom: 65px; right: 0; left: 0; font-size: 7.5vw;
}
@media screen and (orientation: landscape) { h1 { font-size: 7.5vh; }
}
a { -webkit-transition: opacity 0.1s ease-in-out; transition: opacity 0.1s ease-in-out; cursor: pointer; position: relative; border: 1px solid #fcfeff; margin: 5px; font-weight: 300; text-decoration: none; width: 24px; height: 24px; display: inline-block; font-size: 15px; line-height: 24px; opacity: 0.75; color: #fcfeff;
}
a:hover { opacity: 1;
}
a.this:before { content: ""; position: absolute; border-bottom: 7px solid #fcfeff; border-left: 7px solid transparent; right: 0; bottom: 0;
}
a.latest ~ a, a.latest ~ a:hover { cursor: default; opacity: 0.45;
}
nav { -webkit-transform: translate(0, 100%); transform: translate(0, 100%); -webkit-transition: -webkit-transform 0.25s ease-in-out; transition: -webkit-transform 0.25s ease-in-out; transition: transform 0.25s ease-in-out; transition: transform 0.25s ease-in-out, -webkit-transform 0.25s ease-in-out; overflow-x: scroll; white-space: nowrap; font-size: 0; position: absolute; padding: 30px 15px; text-align: center; bottom: -25px; right: 0; left: 0;
}
.pre, .post { position: absolute; pointer-events: none; bottom: 0; height: 55px; width: 25px;
}
.pre { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzE4MmMzOCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzE4MmMzOCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #182c38), color-stop(100%, rgba(24, 44, 56, 0))); background-image: -webkit-linear-gradient(left, #182c38, rgba(24, 44, 56, 0)); background-image: linear-gradient(to right, #182c38, rgba(24, 44, 56, 0)); left: 0;
}
.post { background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjEuMCIgeTE9IjAuNSIgeDI9IjAuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzE4MmMzOCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzE4MmMzOCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA='); background-size: 100%; background-image: -webkit-gradient(linear, 100% 50%, 0% 50%, color-stop(0%, #182c38), color-stop(100%, rgba(24, 44, 56, 0))); background-image: -webkit-linear-gradient(right, #182c38, rgba(24, 44, 56, 0)); background-image: linear-gradient(to left, #182c38, rgba(24, 44, 56, 0)); right: 0;
}
h1:hover ~ nav, nav:hover { -webkit-transform: translate(0, 0); transform: translate(0, 0);
}
Ghost - Script Codes JS Codes
(function() {
}).call(this);
Developer | Alex Bergin |
Username | abergin |
Uploaded | June 12, 2022 |
Rating | 4 |
Size | 5,310 Kb |
Views | 101,200 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
A Pen by Alex Bergin | 3,347 Kb |
G - Golf | 3,098 Kb |
Fancy Text Inputs | 3,934 Kb |
Header Layout | 3,123 Kb |
Baymax | 6,250 Kb |
Ghost | 5,310 Kb |
3D Accelerometer Ball Pit | 8,397 Kb |
Bauble | 5,287 Kb |
Singing Text To Speech | 9,647 Kb |
Show Nav On Scroll | 4,898 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Isometric css island | Xaddict | 2,950 Kb |
CSS Heart Loaders | Nourabusoud | 2,161 Kb |
3D flipping card | Ssaakkaa | 2,238 Kb |
Twitch | SarahDunlap | 2,937 Kb |
Add This API | ThatGuySam | 2,848 Kb |
Portfolio Page | KaylaMT | 1,983 Kb |
Wikipedia viewer | Chpecson | 2,865 Kb |
Easing | GreenSock | 2,043 Kb |
A Pen by Jay | Jaycode | 3,784 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!