Calculator Tools Calculator Tools
Create

Jumpscare Fun

Oct 24, 2023

About this app

A fun jumpscare web app.

Jumpscare Fun 😱 Press if you dare! 😱

Related apps

Put this on your site

Source

                    <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>Jumpscare Fun</title>
<meta name="description" content="A fun jumpscare web app.">
<meta name="keywords" content="jumpscare, horror, fun, webapp">

<link href="https://fonts.googleapis.com/css?family=Creepster" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Chango&display=swap" rel="stylesheet">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

<script type="text/javascript">
try {
var jumpscareSound = new Audio('https://www.myinstants.com/media/sounds/movie_1.mp3'); // Put here your jumpscare sound URL

function playJumpscare(){
jumpscareSound.play();
document.getElementById("scare-image").style.display = "block";
setTimeout(function(){
document.getElementById("scare-image").style.display = "none";
}, 1000);
}

document.addEventListener("DOMContentLoaded", function() {
document.getElementById("scare-button").addEventListener("click", playJumpscare);
});

} catch (error) {
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background: black;
color: white;
font-family: 'Creepster', cursive;
text-align: center;
}
#scare-button {
font-size: 2em;
margin-top: 20%;
background: red;
color: white;
border: none;
padding: 20px;
border-radius: 10px;
font-family: 'Chango', cursive;
}
#scare-image {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background: url('https://placekitten.com/1000/1000') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
display: none;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<button id="scare-button">😱 Press if you dare! 😱</button>
<div id="scare-image"></div>
</div>
</body>
</html>