Image clip path mask
How do I make an image clip path mask?
What is a image clip path mask? How do you make a image clip path mask? This script and codes were developed by Sander on 18 December 2022, Sunday.
Image clip path mask - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Image clip path mask</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='css/jbxqev.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="clip-buttons-container"> <a href="#" class="btn" data-shape="remove">Remove</a> <a href="#" class="btn" data-shape="rectangle">Rectangle</a> <a href="#" class="btn" data-shape="triangle">Triangle</a> <a href="#" class="btn" data-shape="circle">Circle</a> <a href="#" class="btn" data-shape="mask">Mask</a>
</div>
<div class="clip-item"> <img src="http://cdn.sanderkeurentjes.com/stock-images/desert-road-horizon.jpg" alt="Masked images" />
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Image clip path mask - Script Codes CSS Codes
.clip-buttons-container { text-align: center; padding: 20px; background: rgba(0, 0, 0, .1); border-bottom: solid 1px rgba(0, 0, 0, .2); .btn { display: inline-block; padding: 10px 20px; margin: 5px; text-decoration: none; color: #fff; background: $primaryColor; border-radius: 3px; cursor: pointer; &:hover { background-color: darken($primaryColor, 10%); } }
}
.clip-item { postion: relative; width: 640px; margin: 40px auto; img { width: 640px; height: auto; &.triangle { clip-path: polygon(50% 0%, 0% 100%, 100% 100%); } &.circle { clip-path: circle(160px at center); } &.rectangle { position: absolute; max-width: 100%; max-height: 100%; clip: rect(0px, 440px, 320px, 200px); } &.mask { mask: url(http://cdn.sanderkeurentjes.com/stock-images/letter-s.svg); mask-size: contain; mask-repeat: no-repeat; mask-position: center center; } }
}
Image clip path mask - Script Codes JS Codes
$('.btn').click(function(e) { var shape = $(this).attr('data-shape'); e.preventDefault(); $('.clip-item img').removeClass(); $('.clip-item img').addClass(shape);
});
Developer | Sander |
Username | skeurentjes |
Uploaded | December 18, 2022 |
Rating | 3 |
Size | 3,911 Kb |
Views | 8,096 |
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 |
Sticky widget | 3,762 Kb |
Simple gallery | 3,050 Kb |
Button hover effects | 3,642 Kb |
Image gallery with caption | 2,968 Kb |
Flexbox layout | 3,615 Kb |
Search field | 2,280 Kb |
Animates search input with only css | 4,335 Kb |
Dropdown navigation | 3,158 Kb |
Card flip | 2,976 Kb |
Horizontal navigation | 2,183 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 |
Word Wrap Algorithm for Multiline Canvas Text | Peterhry | 2,349 Kb |
Sample Profile Screen | OurDailyBread | 5,375 Kb |
Material design - button rainbow circle | Kunukn | 3,652 Kb |
CSS- UI Element States Pseudo-Classes | Tesla809 | 2,206 Kb |
The Fly | GianlucaGuarini | 3,405 Kb |
AngularJS Skills | Supro | 3,312 Kb |
Michelle, submit your photography to Unsplash. | Zaneriley | 3,368 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
CSS3 Butterfly | Timohausmann | 3,430 Kb |
Arrow Navigation | Hinducows | 1,973 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!