Color Tiles
How do I make an color tiles?
What is a color tiles? How do you make a color tiles? This script and codes were developed by Jonathan Neal on 30 August 2022, Tuesday.
Color Tiles - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Color Tiles</title> <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: 1em; text-align: center;
}
.bw { display: inline-block; position: relative; overflow: hidden; vertical-align: top;
}
.c { -webkit-filter: blur(1px); filter: blur(1px); opacity: 0; position: absolute; transform-origin: 50% 50%; transition: -webkit-filter 1s 0.25s, filter 1s 0.25s, opacity 0s, transform 1s 0.25s;
}
.c.out { -webkit-filter: blur(5px); filter: blur(5px); opacity: 1; transform: scale(0.95, 0.95);
}
.c:hover { -webkit-filter: blur(1px); filter: blur(1px); opacity: 1; transform: scale(1, 1); transition: -webkit-filter 0.5s, filter 0.5s, opacity 0.5s, transform 0.5s;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Color Tiles - Script Codes CSS Codes
body { margin: 1em; text-align: center;
}
.bw { display: inline-block; position: relative; overflow: hidden; vertical-align: top;
}
.c { -webkit-filter: blur(1px); filter: blur(1px); opacity: 0; position: absolute; transform-origin: 50% 50%; transition: -webkit-filter 1s 0.25s, filter 1s 0.25s, opacity 0s, transform 1s 0.25s;
}
.c.out { -webkit-filter: blur(5px); filter: blur(5px); opacity: 1; transform: scale(0.95, 0.95);
}
.c:hover { -webkit-filter: blur(1px); filter: blur(1px); opacity: 1; transform: scale(1, 1); transition: -webkit-filter 0.5s, filter 0.5s, opacity 0.5s, transform 0.5s;
}
Color Tiles - Script Codes JS Codes
var imgbw = new Image, imgc = new Image;
imgbw.onload = function () { var divbw, xRate = 0.05, yRate = 0.05, width = imgbw.width, height = imgbw.height; divbw = document.createElement("div"); divbw.className = "bw"; divbw.style.backgroundImage = "url("+imgbw.src+")"; divbw.style.width = width+"px"; divbw.style.height = height+"px"; var xInterval = width * xRate, yInterval = height * yRate; for (var y = 0; y < height; y += yInterval) { for (var x = 0; x < width; x += xInterval) { (function (divc) { console.log(x, y); divc.className = "c"; divc.style.backgroundImage = "url("+imgc.src+")"; divc.style.backgroundPosition = "-"+x+"px -"+y+"px"; divc.style.left = x+"px"; divc.style.top = y+"px"; divc.style.height = yInterval+"px"; divc.style.width = xInterval+"px"; divc.onmouseout = function () { divc.classList.add("out"); }; })(divbw.appendChild(document.createElement("div"))); } } document.body.appendChild(divbw);
};
imgbw.src = "http://i.imgur.com/W6pSQwd.jpg";
imgc.src = "http://i.imgur.com/0fZhUie.jpg";
Developer | Jonathan Neal |
Username | jonneal |
Uploaded | August 30, 2022 |
Rating | 3.5 |
Size | 2,479 Kb |
Views | 40,480 |
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 |
SVG with and without viewBox | 2,141 Kb |
Element Query Classnames | 3,243 Kb |
Object-fit polyfill | 1,919 Kb |
Chevrons in CSS | 1,908 Kb |
PostCSS Write SVG Example | 1,554 Kb |
SVG for Everybody | 3,207 Kb |
Aim-Aware Menus | 2,950 Kb |
Yelp Ratings SVG | 2,284 Kb |
Preload Example | 2,335 Kb |
A Pen by Jonathan Neal | 1,609 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 |
Material design - button rainbow circle | Kunukn | 3,652 Kb |
Fading gradient button | Insprd | 1,713 Kb |
Wavy Road with Dashes | Jonobr1 | 2,679 Kb |
Blog Concept 2 | JGallardo | 2,994 Kb |
How to add Css Fold Notes In Blogger By Askwithloud.com | Askwithloud | 2,280 Kb |
Popover Example | Seanboom | 2,429 Kb |
Draggables in pure angular | Rlo206 | 5,167 Kb |
A Pen by Mohomed Anees | Mohomedanees | 12,597 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Awesome Full Page Menu Nav | Ey_intuitive | 4,194 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!