Fancy 404

Size
2,569 Kb
Views
14,168

How do I make an fancy 404?

A new cool 404 for my website. I think it is kind of cool ;). What is a fancy 404? How do you make a fancy 404? This script and codes were developed by Gianluca Guarini on 04 November 2022, Friday.

Fancy 404 Previews

Fancy 404 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Fancy 404</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container">	<h1>Not found <span>:(</span></h1>	<p>Sorry, but the page you were trying to view does not exist.</p>	<i>404</i>	</div>
<a href="http://gianlucaguarini.com" target="_blank">	<video autoplay="autoplay" preload loop="loop">	<source src="http://gianlucaguarini.com/videos/noise.mp4" />	<source src="http://gianlucaguarini.com/videos/noise.webm" />	<source src="http://gianlucaguarini.com/videos/noise.ogv" />	</video>	</a> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Fancy 404 - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Oswald);
body, html {	font-family: 'Oswald', sans-serif;	overflow:hidden;	height:100%;	width:100%;	background:black;	color:#333;	font-size:18px;	background:black;	-webkit-user-select: none;	}	video {	position:absolute;	opacity:0.25;	}	.container {	position: absolute;	top:50%;	left:50%;	margin:-250px 0 0 -250px;	height:500px;	text-align: center;	width:500px;	}	i {	font-style: normal;	font-size:200px;	}

Fancy 404 - Script Codes JS Codes

var parent = $(window),	$video = $("video");	// https://raw.github.com/brianreavis/jquery-fitToParent/master/jquery.fittoparent.js	var resize = function () {	var o = {	fitX: true,	fitY: true,	fillArea: false,	allowEnlargement: true	};	parentWidth = parent.innerWidth(),	parentHeight = parent.innerHeight();	var originalSize = $video.data('original-size');	if (!originalSize) {	originalSize = {	width: 1280,	height: 720	};	$video.data('original-size', originalSize);	}	var currentSize = {	width: originalSize.width,	height: originalSize.height	};	var scale = 1;	if (o.fitX && (o.allowEnlargement || currentSize.width > parentWidth)) {	scale = parentWidth / currentSize.width;	currentSize.width = Math.floor(currentSize.width * scale);	currentSize.height = Math.floor(currentSize.height * scale);	}	if (o.fitY) {	var doScale = currentSize.height > parentHeight;	var newScale = parentHeight / currentSize.height;	if (o.fillArea) doScale = currentSize.height < parentHeight;	if (o.allowEnlargement) doScale = newScale > scale;	if (doScale) {	currentSize.width = Math.floor(currentSize.width * newScale);	currentSize.height = Math.floor(currentSize.height * newScale);	scale = newScale;	}	}	$video.css({	top: Math.round((parentHeight - currentSize.height) / 2),	left: Math.round((parentWidth - currentSize.width) / 2),	width: currentSize.width,	height: currentSize.height,	});	}	$(window).on("resize",resize);	resize();
Fancy 404 - Script Codes
Fancy 404 - Script Codes
Home Page Home
Developer Gianluca Guarini
Username GianlucaGuarini
Uploaded November 04, 2022
Rating 3.5
Size 2,569 Kb
Views 14,168
Do you need developer help for Fancy 404?

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!

Gianluca Guarini (GianlucaGuarini) Script Codes
Create amazing sales emails with AI!

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!