Add a Vignette to an image

Developer
Size
2,067 Kb
Views
38,456

How do I make an add a vignette to an image?

Focus areas on your images with this CSS-only vignette, no additional HTML required.. What is a add a vignette to an image? How do you make a add a vignette to an image? This script and codes were developed by EricPorter on 03 September 2022, Saturday.

Add a Vignette to an image Previews

Add a Vignette to an image - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Add a Vignette to an image</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="vignette"> <img src="https://unsplash.it/g/500/500/?random" />
</div>
<div> <img src="https://unsplash.it/g/500/500/?random" />
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Add a Vignette to an image - Script Codes CSS Codes

.vignette:after {	content: "";	display: block;	position: absolute;	top: 0;	right: 0; bottom: 0; left: 0; z-index: 1;	background-color: transparent;	background-image: -webkit-radial-gradient(50% 70%, circle farthest-corner, transparent, rgba(30,20,0,.95) 100%);	background-image: -moz-radial-gradient(50% 70%, circle farthest-corner, transparent, rgba(30,20,0,.95) 100%);	background-image: -o-radial-gradient(50% 70%, circle farthest-corner, transparent, rgba(30,20,0,.95) 100%);	background-image: radial-gradient(50% 70%, circle farthest-corner, transparent, rgba(30,20,0,.95) 100%);
}
div { width: 500px; height: 500px; overflow: hidden; position: relative; outline: 1px solid #999; float: left; margin: 50px;
}
body { background: #111; }

Add a Vignette to an image - Script Codes JS Codes

// Refresh page for new random image.
// You just need to add the
// .vignette class to the image container
Add a Vignette to an image - Script Codes
Add a Vignette to an image - Script Codes
Home Page Home
Developer EricPorter
Username EricPorter
Uploaded September 03, 2022
Rating 3
Size 2,067 Kb
Views 38,456
Do you need developer help for Add a Vignette to an image?

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!

EricPorter (EricPorter) Script Codes
Create amazing love letters 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!