CSS-masking gallery

Size
2,567 Kb
Views
34,408

How do I make an css-masking gallery?

What is a css-masking gallery? How do you make a css-masking gallery? This script and codes were developed by Susanne Karin Lundblad on 13 September 2022, Tuesday.

CSS-masking gallery Previews

CSS-masking gallery - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS-masking gallery</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! */ @import url(https://fonts.googleapis.com/css?family=Lato:300);
body { background-color: #35aa69;
}
.main-wrapper { margin: 10px auto 10px; width: 500px; padding: 1em; background-color: white; overflow: hidden;
}
.preview-field { width: 500px; height: 500px; background-color: #e6e6e6; margin-bottom: 1em; text-align: center;
}
p { line-height: 500px; margin: 0; font-family: Lato, Arial, sans-serif; letter-spacing: 1.5px;
}
.image-wrapper { width: 100%; height: 200px; display: block; background-color: #e6e6e6; position: relative;
}
.image { width: 100px; height: 200px; position: relative; float: left;
}
img { position: absolute; display: block; clip: rect(0, 100px, 200px, 0); transition: all 0.2s ease-out, z-index 0s; opacity: 0.9; top: 0; left: 0: z-index: 0;
}
.image:hover { z-index: 3;
}
.image:hover img.two { left: -100px;
}
.image:hover img.three { left: -200px;
}
.image:hover img.four { left: -300px;
}
.image:hover img.five { left: -400px;
}
.image:hover img { opacity: 1; z-index: 2; clip: rect(0, 500px, 500px, 0); top: -516px; left: 0px; border-radius: 0;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="main-wrapper"> <div class="preview-field"><p>Give me image!<p></div> <div class="image-wrapper"> <div class="image"> <img class="one" src="http://lorempixel.com/500/500/city/"/> </div> <div class="image"> <img class="two" src="http://lorempixel.com/500/500/animals/"/> </div> <div class="image"> <img class="three" src="http://lorempixel.com/500/500/food/"/> </div> <div class="image"> <img class="four" src="http://lorempixel.com/500/500/sports/"/> </div> <div class="image"> <img class="five" src="http://lorempixel.com/500/500/cats/"/> </div> </div>
</div>
</body>
</html>

CSS-masking gallery - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Lato:300);
body { background-color: #35aa69;
}
.main-wrapper { margin: 10px auto 10px; width: 500px; padding: 1em; background-color: white; overflow: hidden;
}
.preview-field { width: 500px; height: 500px; background-color: #e6e6e6; margin-bottom: 1em; text-align: center;
}
p { line-height: 500px; margin: 0; font-family: Lato, Arial, sans-serif; letter-spacing: 1.5px;
}
.image-wrapper { width: 100%; height: 200px; display: block; background-color: #e6e6e6; position: relative;
}
.image { width: 100px; height: 200px; position: relative; float: left;
}
img { position: absolute; display: block; clip: rect(0, 100px, 200px, 0); transition: all 0.2s ease-out, z-index 0s; opacity: 0.9; top: 0; left: 0: z-index: 0;
}
.image:hover { z-index: 3;
}
.image:hover img.two { left: -100px;
}
.image:hover img.three { left: -200px;
}
.image:hover img.four { left: -300px;
}
.image:hover img.five { left: -400px;
}
.image:hover img { opacity: 1; z-index: 2; clip: rect(0, 500px, 500px, 0); top: -516px; left: 0px; border-radius: 0;
}
CSS-masking gallery - Script Codes
CSS-masking gallery - Script Codes
Home Page Home
Developer Susanne Karin Lundblad
Username SusanneLundblad
Uploaded September 13, 2022
Rating 3
Size 2,567 Kb
Views 34,408
Do you need developer help for CSS-masking gallery?

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!

Susanne Karin Lundblad (SusanneLundblad) Script Codes
Create amazing web content with AI!

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!