Product caption blur
How do I make an product caption blur?
A caption for a product which appears to blur the background behind it. Uses a positioned duplicate background.. What is a product caption blur? How do you make a product caption blur? This script and codes were developed by T.J. Fogarty on 08 November 2022, Tuesday.
Product caption blur - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Product caption blur</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <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! */ *, *:before, *:after { box-sizing: border-box;
}
h1 { text-align: center;
}
.products { list-style: none; padding: 0; width: 50%; margin: 0 auto;
}
.products li { margin: 0; padding: 0; float: left; padding: 0 5px;
}
.products a { display: block; text-decoration: none;
}
.product { margin: 0 0 20px 0; max-height: 400px; position: relative; color: #fff; overflow: hidden;
}
.product .product__caption { position: absolute; bottom: 0; padding: 10px; min-height: 100px; width: 100%; border-top: 1px solid white;
}
.product .product__caption .product__caption-background { position: absolute; top: 0; left: 0; background-position: 100% 100%; width: 100%; height: 100%; -webkit-filter: blur(4px); filter: blur(4px);
}
.product__name, .product__price { position: relative; z-index: 1;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div ng-app> <div ng-controller="ProductController"> <h1>{{products.length}} Products</h1> <ul class="products"> <li ng-repeat="product in products"> <a href="#"> <figure class="product"> <img src="{{product.image}}" alt="{{product.name}}" class="product__image"> <figcaption class="product__caption"> <h3 class="product__name">{{product.name}}</h3> <span class="product__price">{{product.price}}</span> <div class="product__caption-background" style="background-image: url({{product.image}})" class="product__caption-background"></div> </figcaption> </figure> </a> </li> </ul> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Product caption blur - Script Codes CSS Codes
*, *:before, *:after { box-sizing: border-box;
}
h1 { text-align: center;
}
.products { list-style: none; padding: 0; width: 50%; margin: 0 auto;
}
.products li { margin: 0; padding: 0; float: left; padding: 0 5px;
}
.products a { display: block; text-decoration: none;
}
.product { margin: 0 0 20px 0; max-height: 400px; position: relative; color: #fff; overflow: hidden;
}
.product .product__caption { position: absolute; bottom: 0; padding: 10px; min-height: 100px; width: 100%; border-top: 1px solid white;
}
.product .product__caption .product__caption-background { position: absolute; top: 0; left: 0; background-position: 100% 100%; width: 100%; height: 100%; -webkit-filter: blur(4px); filter: blur(4px);
}
.product__name, .product__price { position: relative; z-index: 1;
}
Product caption blur - Script Codes JS Codes
function ProductController($scope) { $scope.products = [ {name: 'First Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/1'}, {name: 'Second Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/2'}, {name: 'Third Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/3'}, {name: 'Fourth Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/4'}, {name: 'Fifth Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/5'}, {name: 'Sixth Product', price: '€10', image: 'http://lorempixel.com/200/400/fashion/6'} ];
}
Developer | T.J. Fogarty |
Username | tjFogarty |
Uploaded | November 08, 2022 |
Rating | 3 |
Size | 3,350 Kb |
Views | 16,192 |
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 |
Notify | 3,336 Kb |
Expanding Navigation | 3,473 Kb |
Generate mobile navigation | 3,515 Kb |
A Pen by T.J. Fogarty | 2,240 Kb |
Gyroscope type effect | 2,074 Kb |
Caption reveal | 2,205 Kb |
Toggle content | 3,224 Kb |
Full-screen overlay | 3,253 Kb |
Responsive Hexagon Grid | 4,159 Kb |
Hexagon grid - Stage 1 | 2,111 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 |
Acorrdian 2016 | Milanodituti | 3,720 Kb |
Alter bg opacity on hover... | Chrisboon27 | 2,054 Kb |
Formations | Cantelope | 5,731 Kb |
Shopping List | Markmurray | 6,015 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
FCC Portfolio | Cmwebby | 4,304 Kb |
Twitch JSON API | Jvhti | 2,808 Kb |
JQuery Validate checkbox group | Lunaman | 2,466 Kb |
ECharts Version 3.0 - Bar Marker Chart | WebCodePro | 2,726 Kb |
Shop Talk logo made in CSS | Hugo | 19,368 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!