Image gallery with caption

Developer
Size
2,968 Kb
Views
8,096

How do I make an image gallery with caption?

A simple image gallery with animated captions drawn from data tags. Made with ccs3.. What is a image gallery with caption? How do you make a image gallery with caption? This script and codes were developed by Sander on 18 December 2022, Sunday.

Image gallery with caption Previews

Image gallery with caption - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Image gallery with caption</title> <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="wrapper roundedCorners">	<div class="main">	<h1 class="pageTitle">Image gallery</h1>	<h2 class="pageSubtitle">With caption fom data tags</h2>	<p>A nice image gallery with animated caption drawn from the image data tags. Made with CSS3 for modern browsers. Less modern browsers or non-browser	(like Internet Explorer) may encounter problems with showing the layout correctly.</p>	</div>
</div>
<ul class="top">	<li class="galleryItem">	<a class="caption" href="#" data-title="Colored landscape" data-description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce id sapien condimentum, sagittis erat rhoncus, bibendum nisi.">	<img src="http://media.digitalcameraworld.com/files/2012/10/Vertorama_landscape_photography_tips_PHO17.insight02and03.vertorama.jpg" alt="Landscape image">	</a>	</li>	<li class="galleryItem">	<a class="caption" href="#" data-title="Black &amp; white photo" data-description="Vivamus ut sem id magna consequat porta vitae ut sem. Proin eget commodo risus, vitae blandit velit. ">	<img src="http://media.digitalcameraworld.com/files/2012/11/Black_and_white_landscape_photography_DCM131.shoot_creative.main_image_RGB.jpg" alt="Landscape image">	</a>	</li
</ul>
</body>
</html>

Image gallery with caption - Script Codes CSS Codes

@import url(https://fonts.googleapis.com/css?family=Titillium+Web:400,600,700,300,200);
@import url(https://fonts.googleapis.com/css?family=Croissant+One);
@import url(https://fonts.googleapis.com/css?family=Poiret+One);
*,
*:after,
*:before { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
html {	background: #E4E4E4;
}
body {	padding: 1px;	font-family: 'Titillium Web', sans-serif;	font-size: 16px;	font-weight: 300;	line-height: 22px; color: #666;
}
h1,
h2,
h3 {	font-weight: 600;
}
a {	text-decoration: none;
}
/* TITLES
===================================================== */
.pageTitle {	display: block;	margin: 0 0 0.2em 0;	font-size: 2.2em;	line-height: 1em;	color: #3CA0D0;
}
.pageSubtitle {	display: block;	margin: 0 0 0.4em 0;	font-size: 1.4em;	line-height: 1em;	color: #333;
}
/* EFFECTS
===================================================== */
.roundedCorners {	-webkit-border-radius: 5px; border-radius: 5px;
}
.roundedCornersTop {	-webkit-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0;
}
.roundedCornersBottom {	-webkit-border-radius: 0 0 5px 5px; border-radius: 0 0 5px 5px;
}
.boxShadow {	-webkit-box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);	box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.25);
}
/* LAYOUT
===================================================== */
.wrapper {	width: 600px;	margin: 20px auto;
}	.top {	width: 100%;	min-height: 300px;	padding: 20px 0;	text-align: center;	}	.main {	width: 96%;	padding: 2% 2% 5% 2%; margin: 5% 0;	background: none; border-bottom: solid 1px #ccc;	}	.footer {	width: 96%;	padding: 2%;	background: #222;	border-top:	solid	3px	#086FA1;	}
/* GALLERY
===================================================== */
.galleryItem {	display: inline-block;;	position: relative; width: 250px; height: 250px; padding: 0;	margin: 0 20px;
}
.galleryItem img {	width: 100%;	height: 100%; border: solid 10px #fff;
}
.caption {	position: relative; overflow: hidden;	display: inline-block;	width: 250px;	height: 250px;	z-index: 10;
}
.caption::before {	content: attr(data-title);	position: absolute;	top: -50%;	left: 0;	width: 100%;	height: 50%; padding: 10px; font-family: 'Croissant One', cursive;	font-size: 1.8em;	font-weight: 600;	line-height: 1.4em;	color: #086FA1;	background: #fff;	overflow: hidden;	-webkit-transition: all 0.3s ease;	-moz-transition: all 0.3s ease;	-ms-transition: all 0.3s ease;	-o-transition: all 0.3s ease;	transition: all 0.3s ease;
}
.caption::after {	content: attr(data-description);	position: absolute;	bottom: -50%;	left: 0;	width: 100%;	height: 50%; padding: 10px; font-family: 'Poiret One', cursive;	font-size: .9em;	font-weight: 400;	line-height: 1.4em;	color: #fff;	background: #222;	overflow: hidden;	-webkit-transition: all 0.3s ease;	-moz-transition: all 0.3s ease;	-ms-transition: all 0.3s ease;	-o-transition: all 0.3s ease;	transition: all 0.3s ease;
}
.caption:hover::before {	top: 0;
}
.caption:hover::after {	bottom: 0;
}
Image gallery with caption - Script Codes
Image gallery with caption - Script Codes
Home Page Home
Developer Sander
Username skeurentjes
Uploaded December 18, 2022
Rating 4.5
Size 2,968 Kb
Views 8,096
Do you need developer help for Image gallery with caption?

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!

Sander (skeurentjes) Script Codes
Create amazing sales emails 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!