Image caption overlay

Developer
Size
2,107 Kb
Views
20,240

How do I make an image caption overlay?

Hovering over image displays caption via CSS transition, dawg.. What is a image caption overlay? How do you make a image caption overlay? This script and codes were developed by Mitch Pruitt on 08 November 2022, Tuesday.

Image caption overlay Previews

Image caption overlay - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Image caption overlay</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body> <div class="group"> <div class="hold-it"> <img src="http://lorempixel.com/300/300/nature" /> <span class="overlay"><p>Much much more mysteriously python tediously some more so darn crud after</p></span> </div> <div class="hold-it"> <img src="http://lorempixel.com/300/300/sports" /> <span class="overlay"><p>Leaned callously that pointed piranha far this when the much far so jeepers dear hey wearisome rhinoceros</p></span> </div> <div class="hold-it"> <img src="http://lorempixel.com/300/300/food" /> <span class="overlay"><p>Endless persistently dove black where hey and spoke a much that excepting goodness poutingly then stylistic</p></span> </div> <div class="hold-it"> <img src="http://lorempixel.com/300/300/city" /> <span class="overlay"><p>Darn vivid derisive crud quietly walked but newt gorilla until tacitly about far</p></span> </div> </div>
</body>
</body>
</html>

Image caption overlay - Script Codes CSS Codes

* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
body { background-image: url(https://subtlepatterns.com/patterns/first_aid_kit.png)
}
.group { width: 600px; margin: 40px auto auto auto; -webkit-border-radius: 4px; border-radius: 4px; overflow: hidden;
}
.hold-it { position: relative; width: 300px; height: 300px; margin-left: auto; margin-right: auto; float: left; overflow: hidden;
}
.overlay { display: block; position: absolute; top: auto; right: auto; left: 0; bottom: 0; z-index: 2; width: 100%; height: 100%; padding: 10px; color: #fff; background-color: #000; opacity: 0; -webkit-transition: all 250ms ease-in; -moz-transition: all 250ms ease-in; -ms-transition: all 250ms ease-in; -o-transition: all 250ms ease-in;	transition: all 250ms ease-in;
}
.hold-it:hover .overlay { opacity: .75;
}
p { position: absolute; bottom: 0; padding-bottom: 6px; margin: auto; font: 100 32px "Helvetica Neue"; letter-spacing: 1px;
}
Image caption overlay - Script Codes
Image caption overlay - Script Codes
Home Page Home
Developer Mitch Pruitt
Username mitchdot
Uploaded November 08, 2022
Rating 3
Size 2,107 Kb
Views 20,240
Do you need developer help for Image caption overlay?

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!

Mitch Pruitt (mitchdot) 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!