Transitioning Backgrounds
How do I make an transitioning backgrounds?
Transitioning background images are masked by a static SVG.. What is a transitioning backgrounds? How do you make a transitioning backgrounds? This script and codes were developed by Rich Wertz on 29 January 2023, Sunday.
Transitioning Backgrounds - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Transitioning Backgrounds</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html lang>
<head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Transitioning backgrounds</title> </head> <body> <div class="bg"> <div class="bg_item"></div> <div id="fader" class="bg_item"></div>
</div>
<div id="svg"></div> <script> </script> </body> </html> <script src="js/index.js"></script>
</body>
</html>
Transitioning Backgrounds - Script Codes CSS Codes
html,
body { margin: 0; padding: 0; width: 100%; height: 100%;
}
#svg { width: 100%; height: 100%; color: rgb(2, 200, 242); background-color: currentColor; -webkit-mask: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/329887/WD258-img-hero1.svg') no-repeat 50% 50%; -webkit-mask-size: cover;
}
.bg { position: fixed; top: 0; left: 0; z-index: -1; width: 100%; height: 100%;
}
.bg_item { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-position: 50% 50%; background-repeat: no-repeat; transition: opacity 2500ms ease;
}
.bg_item:nth-child(1) { background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/329887/WD258-2.jpg'); background-size: cover;
}
.bg_item:nth-child(2) { background-image: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/329887/WD258-1.jpg'); background-size: cover;
}
.hide { opacity: 0;
}
/*
https://s3-us-west-2.amazonaws.com/s.cdpn.io/329887/WD258-1.jpg
*/
Transitioning Backgrounds - Script Codes JS Codes
var fader = document.getElementById('fader'); var timer = setInterval(switcher, 3000); function switcher() { fader.classList.toggle('hide'); }
Developer | Rich Wertz |
Username | richwertz |
Uploaded | January 29, 2023 |
Rating | 3 |
Size | 2,099 Kb |
Views | 10,120 |
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 |
Subtle Background Image Animation | 1,734 Kb |
JQuery1 | 1,429 Kb |
Content Container Animation | 1,882 Kb |
Video-background | 2,002 Kb |
Fullscreen Menu | 10,483 Kb |
Loading Animation Example | 1,719 Kb |
A Pen by Rich Wertz | 1,598 Kb |
Animated Title Effect | 1,860 Kb |
SCSS basics | 1,824 Kb |
Typing Text Effect | 1,997 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 |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Price Comparison Table | Orrinward | 3,459 Kb |
Blog Concept - Single Post | Marionebl | 9,603 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
Confirm Close Of Foundation Reveal Modal | Winghouchan | 1,818 Kb |
Pure CSS candle light animation by One element | Ksksoft | 2,193 Kb |
Text Looping Transition | Agelber | 5,619 Kb |
Simple checkbox style | Vncnz | 2,628 Kb |
HEXAGON | Aurumlux | 1,684 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!