About
Explore
Events & Classes
Support Us
Join
Sign In
purple_ghost
View Project Page
Run
Fullscreen
Ghost! | A Movie by purple_ghost
HTML
CSS
JS
<!-- Ghost! A movie by purple ghost. If experiencing watching issues, please right click the box where the movie is displayed and click refresh frame. Any errors, suggestions or improvements are welcome. Created by purple_ghost, subject to copyright. Release Date: 19/08/2020. By purple_ghost. --> <!DOCTYPE HTML> <html> <head> <title>Page Title</title> <meta charset='utf-8'> <meta name='author' content='purple_ghost'> <meta name='viewport' content='width=device-width, initial-scale=1.0'> </head> <body> <div class="movie"><h1>A</h1><h1>Movie</h1></div> <div class="movie" style="display: none;"><h1>A WebMovie movie</h1></div> <div class="movie" style="display: none;"><h1>Hope you enjoy...</h1></div> <div class="scene attic" id="attic"></div> <div class="prop ghost" scene="attic"></div> </body> </html>
body { overflow: hidden; } .scene { position: fixed; display: none; top: 0%; bottom: 0%; z-index: -1; right: 0%; left: 0%; } .attic { background-color: #0a0400; } .prop { display: none; position: relative; z-index: 1000; } .movie { position: fixed; top: 0%; background-color: black; bottom: 0%; z-index: -1; right: 0%; justify-content: center; align-items: center; text-align: center; left: 0%; color: white; } .ghost { background-color: #c4fffc; width: 100px; height: 100px; opacity: .9; border-top-left-radius: 50px; border-top-right-radius: 50px; margin-left: 10px; animation-delay: 2s; } .ghost:after { background: linear-gradient(-45deg, #c4fffc 16px, transparent 0), linear-gradient(45deg, #c4fffc 16px, transparent 0); background-position: center bottom; background-repeat: repeat-x; background-size: 32px 32px; content: " "; display: block; transform: scale(-1, -1); position: absolute; top: 90px; left: 0px; width: 100px; height: 32px; } @keyframes glide { 10% { margin-left: 180px; } 20% { margin-left: 220px; } 30% { margin-left: 260px; } 40% { margin-left: 300px; } 50% { margin-left: 340px; } 60% { margin-left: 380px; } 70% { margin-left: 420px; } 80% { margin-left: 460px; } 90% { margin-left: 500px; } 100% { margin-left: 630px; } } h1 { font-size: 40px; font-family: Arial; }
var movie1 = document.getElementsByClassName("movie")[0]; var movie2 = document.getElementsByClassName("movie")[1]; var movie3 = document.getElementsByClassName("movie")[2]; var scene1 = document.getElementsByClassName("scene")[0]; var prop1 = document.getElementsByClassName("prop")[0]; setInterval(function() { display(movie1, movie2) setInterval(function() { display(movie2, movie3) setInterval(function() { display(movie3, scene1) propsDisplay(scene1) ghost() }, 3000) }, 3000) }, 3000); function display(elem, elem2) { elem.style.display = 'none'; elem2.style.display = 'block'; } function propsDisplay(scene) { var sceneId = scene.id; var props = document.querySelector("[scene='" + sceneId + "']"); props.style.display = 'block'; } function ghost() { prop1.style.animation= "glide 8s infinite"; }