Refract Light Overlay
How do I make an refract light overlay?
Just a little experiment. Using jQuery to determine size of image then wrap with the refraction gradient.. What is a refract light overlay? How do you make a refract light overlay? This script and codes were developed by Mark Peck on 13 October 2022, Thursday.
Refract Light Overlay - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Refract Light Overlay</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<img src="http://placekitten.com/300/300"> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Refract Light Overlay - Script Codes CSS Codes
html { background: #FF6F47;
}
body { padding: 0; margin: 0;
}
.refract_wrap { position: relative; overflow: hidden; box-shadow: 15px 15px 0 #fff; margin: 50px;
}
.refract {
background: -moz-linear-gradient(-45deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.18) 49%, rgba(255,255,255,0) 50%, rgba(255,255,255,0) 99%, rgba(255,255,255,0) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(255,255,255,0.5)), color-stop(49%,rgba(255,255,255,0.18)), color-stop(50%,rgba(255,255,255,0)), color-stop(99%,rgba(255,255,255,0)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0.18) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 99%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0.18) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 99%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0.18) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 99%,rgba(255,255,255,0) 100%); /* IE10+ */
background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%,rgba(255,255,255,0.18) 49%,rgba(255,255,255,0) 50%,rgba(255,255,255,0) 99%,rgba(255,255,255,0) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#80ffffff', endColorstr='#00ffffff',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */ width: 100%; height: 100%; position: absolute; top: 0; left: 0;
}
Refract Light Overlay - Script Codes JS Codes
var imgHeight = $('img').height();
var imgWidth = $('img').width();
$('img').wrap('<div class="refract_wrap"></div>');
$('.refract_wrap').append('<div class="refract"></div').css({ height: imgHeight, width: imgWidth });
Developer | Mark Peck |
Username | doodlemarks |
Uploaded | October 13, 2022 |
Rating | 3 |
Size | 2,181 Kb |
Views | 22,264 |
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 Wiggle Animation | 2,072 Kb |
Bootstrap Styleguide | 3,710 Kb |
JQuery UI Draggable Experiment | 2,249 Kb |
3D Styled CSS Browser Mockup | 1,956 Kb |
Very Simple Slider | 2,682 Kb |
Crown Loader Animation | 2,331 Kb |
Colors | 2,707 Kb |
Automated Browser Mockup | 1,963 Kb |
Basic line animation vivus | 1,694 Kb |
Simple Accurate Counter | 1,538 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 |
Calculator | Rzencoder | 4,572 Kb |
Canvas stripes | Adrianparr | 1,948 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 Kb |
React Vote Component | Souporserious | 5,465 Kb |
HTML5 Breakout | Jaysalvat | 4,873 Kb |
Background Images | Jooonebug | 2,100 Kb |
Pagepilling.js | Blossk | 6,554 Kb |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
Sexy Social Buttons | Ipiyale | 2,226 Kb |
Filter inputs | Rowinf | 1,721 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!