CSGO image overlay using clip path
How do I make an csgo image overlay using clip path?
I tried to recreate the Counter Strike Global Offensive map thumbnail overlay from the ingame lobby. I'd like to make it dynamic so you can select how many images you want to see. Maybe in a few days... :). What is a csgo image overlay using clip path? How do you make a csgo image overlay using clip path? This script and codes were developed by Joost Jansen on 19 November 2022, Saturday.
CSGO image overlay using clip path - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSGO image overlay using clip path</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="maps"> <img src="http://placehold.it/400x400" class="map" /> <img src="http://placehold.it/400x400" class="map" /> <img src="http://placehold.it/400x400" class="map" /> <img src="http://placehold.it/400x400" class="map" /> <img src="http://placehold.it/400x400" class="map" />
</div> <script src="js/index.js"></script>
</body>
</html>
CSGO image overlay using clip path - Script Codes CSS Codes
html,
body { height: 100%;
}
body { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
}
.maps { height: 500px; width: 800px; position: relative; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.maps img.map { height: 100%; position: absolute; top: 0; left: 0;
}
CSGO image overlay using clip path - Script Codes JS Codes
const mapsImages = document.querySelectorAll('img.map');
const mapsUrls = [ "https://4.bp.blogspot.com/-mQBVLSZx764/VhIrU_je81I/AAAAAAAAAC8/0fdO-W6pUzw/s1600/CSGO_Dust2_B_2_10_July_2014_Update.jpg", "http://teambeyond.net/wp-content/uploads/2015/03/CS-GO-Cobblestone.jpg", "http://vignette3.wikia.nocookie.net/cswikia/images/0/0f/Csgo-de-inferno.png", "http://vignette4.wikia.nocookie.net/cswikia/images/9/91/Csgo_shorttrain_big.jpg/revision/latest?cb=20130420150941", "http://static.hltv.org/images/galleries/7477-medium/1451261300.3293.jpeg"
];
const widthRegular = 1 / mapsImages.length * 100;
const widthLast = widthRegular + 10;
Array.from(mapsImages).forEach((m, i) => { const isLastPolygon = i === mapsImages.length - 1; const width = isLastPolygon ? widthLast : widthRegular; const x1 = i * widthRegular; const x2 = Math.min(100, x1 + width); const x4 = Math.max(-10, x1 - 10); const x3 = x4 + width; const result = `polygon(${x1}% 0, ${x2}% 0, ${x3}% 100%, ${x4}% 100%)`; m.style.clipPath = result; m.style.zIndex = `${mapsImages.length - i + 1}`; m.src = mapsUrls[i];
});
Developer | Joost Jansen |
Username | DevItWithDavid |
Uploaded | November 19, 2022 |
Rating | 3 |
Size | 2,794 Kb |
Views | 267,168 |
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 |
Flexbox Mixin | 2,746 Kb |
League of Legends Login UI | 6,748 Kb |
Personal website redesign v1.0 | 5,067 Kb |
Flexbox is AWESOME | 2,524 Kb |
Star Wars Battlefront I 2016 Interface | 6,229 Kb |
React Close Dialog with Animation | 5,569 Kb |
TicTacToe | 4,809 Kb |
Portfolio Joost Jansen 2016 | 5,671 Kb |
Personal Website Redesign v2.0 | 5,168 Kb |
Flexbox Layout - One page website | 5,649 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 |
Starfield using KineticJS | Asp | 3,512 Kb |
Sticky footer testing | 75th | 1,649 Kb |
Search field | Jamesbarnett | 2,100 Kb |
Navier Stoke Fluid Simulation | Esimov | 8,584 Kb |
Shop Talk logo made in CSS | Hugo | 19,368 Kb |
My Starter Kit For Codepen | Dkdesign | 2,012 Kb |
Bloomberg Style Link Hover | Gil-- | 1,609 Kb |
Parallax.js | Zmeeey5 | 2,330 Kb |
A Pen by Alex Edwards | Exards | 8,218 Kb |
Codero Sitemap | S1m0ne | 28,169 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!