Image gallery with caption
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 - 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 & 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;
}
Developer | Sander |
Username | skeurentjes |
Uploaded | December 18, 2022 |
Rating | 4.5 |
Size | 2,968 Kb |
Views | 8,096 |
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 |
Automatic scroll | 4,042 Kb |
Dropdown navigation | 3,158 Kb |
Flexbox table | 4,118 Kb |
Sticky widget | 3,762 Kb |
Image clip path mask | 3,911 Kb |
Parallax scrolling background | 3,403 Kb |
Pure CSS dropdown navigation | 2,355 Kb |
Custom input radio buttons | 2,158 Kb |
Search field | 2,280 Kb |
Horizontal navigation | 2,183 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 |
Improved Page Flipping Effect | Usaphp | 5,201 Kb |
To Do List with Delete | Mattlbrody | 2,068 Kb |
Pure CSS Menu | Bronsrobin | 3,321 Kb |
Flat iOS 7 Safari Icon | Rss | 3,332 Kb |
The Rope | Chribbe | 2,886 Kb |
Sticky menu on scroll | Senff | 2,869 Kb |
Yuliya v krylova | Rafszul | 37,351 Kb |
Nice textured background | Hans | 2,659 Kb |
Sass random color animation | Jotavejv | 4,827 Kb |
Expandable Left Side Bar with jQuery animate | Retrofuturistic | 2,483 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!