Perforated foil

2,617 Kb

How do I make an perforated foil?

Inspired by an bus ride. That bus was full with advertising, including the windows with these perforated foil. If you try to look trough the foreground gets blurry, if you try to focus the foil the background gets blurred.. What is a perforated foil? How do you make a perforated foil? This script and codes were developed by Oliver Kühn on 15 November 2022, Tuesday.

Perforated foil Previews

Perforated foil - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Perforated foil</title> <link rel="stylesheet" href="css/style.css">
<body> <a href="#" class="container"> <div class="image"></div> <div class="grid"></div>
<script type="text/javascript">
function border_onClick(event) { var el = document.getElementsByClassName('container')[0]; el.className = (el.className.indexOf('focus') > 0) ? 'container' : 'container focus';
<!-- Hide blurring borders -->
<div class="border" onclick="border_onClick(event)">Click to change focus</div> <script src="js/index.js"></script>

Perforated foil - Script Codes CSS Codes

html, body
{ width: 100%; height: 100%; padding: 0; margin: 0; background-color: #000; font-family: monospace;
.grid, .image, .border
{ position: absolute; top: 0; left: 0; bottom: 0; right: 0;
{ border: 40px solid #000; padding: 20px; color: #000; font-size: 24px; text-shadow: 1px 0 0 #FFF, -1px 0 #FFF, 0 1px 0 #FFF, 0 -1px 0 #FFF, 1px 1px 0 #FFF, -1px -1px 0 #FFF, -1px 1px 0 #FFF, 1px -1px 0 #FFF;
{ background: #000 url( center no-repeat;
.container .image
{ -webkit-filter: blur(5px); -webkit-transition: -webkit-filter linear 1s;
.container .grid
{ -webkit-filter: blur(0px); -webkit-transition: -webkit-filter linear 1s;
.container.focus .image
{ -webkit-filter: blur(0px);
.container.focus .grid
{ -webkit-filter: blur(5px);

Perforated foil - Script Codes JS Codes

I don't know why, but if you are in the editor the images flashes white on the beginning and ending of the animation. Fullscreen or leaving editor works.
Perforated foil - Script Codes
Perforated foil - Script Codes
Home Page Home
Developer Oliver Kühn
Username 0x04
Uploaded November 15, 2022
Rating 3.5
Size 2,617 Kb
Views 14,168
Do you need developer help for Perforated foil?

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!

Oliver Kühn (0x04) Script Codes
Create amazing Facebook ads 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!