Image based blurry background
How do I make an image based blurry background?
What is a image based blurry background? How do you make a image based blurry background? This script and codes were developed by Orion Drummond on 22 August 2022, Monday.
Image based blurry background - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Image based blurry background</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { margin: 0; padding: 0; min-height: 100vh;
}
figure { margin: 0; padding: 0; position: relative; z-index: 0; background-size: 1px 50%;
}
figure menu { position: absolute; z-index: 1; padding: 0; margin: 0; top: 100%; left: 1em; background-color: rgba(0, 0, 0, 0.5); color: #ffffff; box-shadow: inset 0 0 0 0.1em rgba(255, 255, 255, 0.35);
}
figure menu input { display: block; margin: 3ex 1em;
}
figure:before,
figure:after { display: block; width: 100%; height: 100%;
}
figure:before { position: absolute; content: ""; background-image: url("//media-cache-ak0.pinimg.com/736x/eb/35/e2/eb35e21d1e249f07738e9d5634962d78.jpg"); background-size: inherit; transform: scale(2, 5);
}
figure.smooth:before { -webkit-filter: blur(3px);
}
figure:after { position: relative; content: url("//media-cache-ak0.pinimg.com/736x/eb/35/e2/eb35e21d1e249f07738e9d5634962d78.jpg"); background-image: linear-gradient(to bottom, black, transparent);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <figure id="hero" class="smooth"> <menu> <input data-target="#hero" type="range" min="1" max="3" step="1" name="x"/> <input data-target="#hero" type="range" min="20" max="80" step="1" name="y"/> <input data-target="#hero" type="checkbox" checked name="smooth"/> </menu>
</figure> <script src="js/index.js"></script>
</body>
</html>
Image based blurry background - Script Codes CSS Codes
body { margin: 0; padding: 0; min-height: 100vh;
}
figure { margin: 0; padding: 0; position: relative; z-index: 0; background-size: 1px 50%;
}
figure menu { position: absolute; z-index: 1; padding: 0; margin: 0; top: 100%; left: 1em; background-color: rgba(0, 0, 0, 0.5); color: #ffffff; box-shadow: inset 0 0 0 0.1em rgba(255, 255, 255, 0.35);
}
figure menu input { display: block; margin: 3ex 1em;
}
figure:before,
figure:after { display: block; width: 100%; height: 100%;
}
figure:before { position: absolute; content: ""; background-image: url("//media-cache-ak0.pinimg.com/736x/eb/35/e2/eb35e21d1e249f07738e9d5634962d78.jpg"); background-size: inherit; transform: scale(2, 5);
}
figure.smooth:before { -webkit-filter: blur(3px);
}
figure:after { position: relative; content: url("//media-cache-ak0.pinimg.com/736x/eb/35/e2/eb35e21d1e249f07738e9d5634962d78.jpg"); background-image: linear-gradient(to bottom, black, transparent);
}
Image based blurry background - Script Codes JS Codes
var stub = [1, 50];
document.getElementsByName("x")[0].addEventListener("change", function() { stub[0] = this.value; document.querySelector(this.getAttribute("data-target")).style.backgroundSize = parseInt(this.value).toPrecision(1) + "px " + stub[1] + "%"; }, false);
document.getElementsByName("y")[0].addEventListener("change", function() { stub[1] = this.value; document.querySelector(this.getAttribute("data-target")).style.backgroundSize = (stub[0] + "px " + Math.floor(this.value) + "%"); }, false);
document.getElementsByName("smooth")[0].addEventListener("change", function() { var cl = document.querySelector(this.getAttribute("data-target")).classList; console.log(this.checked); if(this.checked) { cl.add("smooth"); } else { cl.remove("smooth"); } }, false);
Developer | Orion Drummond |
Username | tappily |
Uploaded | August 22, 2022 |
Rating | 3 |
Size | 3,695 Kb |
Views | 28,336 |
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 |
Aspect-oriented tabs | 4,693 Kb |
Blue folds wallpaper | 2,137 Kb |
Warp scaffold | 11,353 Kb |
Can define | 1,995 Kb |
3d stacked preview | 3,760 Kb |
Reading Grid | 4,306 Kb |
A Pen by Orion Drummond | 3,309 Kb |
Neon wallpaper | 2,635 Kb |
Flex scrolling tbody | 3,112 Kb |
Flex decorators | 2,755 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 |
AOR site logo | Thatbram | 2,527 Kb |
Get third wednesday | Wojtek1150 | 2,691 Kb |
A Pen by Miro Olma | Programiro | 2,342 Kb |
A Pen by Jess | Jessamyne | 5,100 Kb |
Awesome | Samarthpd | 2,901 Kb |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Blog | Rottingroom | 1,430 Kb |
Barber Shop | Bhlaird | 6,270 Kb |
Canvas Background Effect | Sonick | 3,513 Kb |
Simple Login Form Template | Banunn | 3,571 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!