Figure caption hover effect
How do I make an figure caption hover effect?
What is a figure caption hover effect? How do you make a figure caption hover effect? This script and codes were developed by Michaela on 27 July 2022, Wednesday.
Figure caption hover effect - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Figure caption hover effect</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.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! */ /* Variables */
/* Fonts */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300);
body { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 300; line-height: 1.5; letter-spacing: 0.05em;
}
/* Styles */
.grid { list-style: none; text-align: center; margin: 0 auto; padding: 2em; max-width: 80rem;
}
@media screen and (max-width: 35rem) { .grid { padding: 10px 10px 100px 10px; }
}
.grid li { text-align: left; display: inline-block; overflow: hidden; margin: 0; padding: 2em; position: relative; width: 28em; height: 21em;
}
@media screen and (max-width: 35rem) { .grid li { padding: 0; width: 100%; min-width: 300px; }
}
.grid figure { background-color: black; cursor: pointer; margin: 0; position: relative; height: 100%;
}
.grid figure img { opacity: 0.7; width: 100%; display: block; position: relative;
}
.grid figure p { -moz-transition: opacity 0.2s ease-in; -o-transition: opacity 0.2s ease-in; -webkit-transition: opacity 0.2s ease-in; transition: opacity 0.2s ease-in; color: white; text-align: center; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.5); -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 50%; left: 50%; margin-top: -0.75em; margin-left: -6em; padding: 0.4em 0.6em; width: 12em;
}
.grid figcaption { color: white; font-size: 0.875em; background-color: black; padding: 1.2em; position: absolute; top: 0; left: 0; height: 100%;
}
.grid figcaption h3 { font-size: 1.2em; border-bottom: 1px solid white; margin: 0 0 0.5em 0; padding: 0 0 0.5em 0;
}
.grid figcaption a { color: white; font-size: 0.875em; text-align: center; text-decoration: none; border: 1px solid white; display: inline-block; padding: 0.45em 0.5em 0.5em 0.5em; position: absolute; bottom: 1.2em; right: 1.5em;
}
.grid figcaption a:hover, .grid figcaption a:active { background-color: white; color: black;
}
/* Animation */
.grid-animation li { perspective: 1700px; perspective-origin: 0 50%;
}
.grid-animation figure { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; overflow: hidden;
}
.grid-animation figure img { -moz-transition: -moz-transform 0.25s; -o-transition: -o-transform 0.25s; -webkit-transition: -webkit-transform 0.25s; transition: transform 0.25s;
}
.grid-animation figcaption { transform-origin: 0 0; -moz-transform: rotateY(-90deg); -ms-transform: rotateY(-90deg); -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); -moz-transition: -moz-transform 0.3s, opacity 0.1s 0.3s; -o-transition: -o-transform 0.3s, opacity 0.1s 0.3s; -webkit-transition: -webkit-transform 0.3s, opacity 0.1s; -webkit-transition-delay: 0s, 0.3s; transition: transform 0.3s, opacity 0.1s 0.3s; backface-visibility: hidden; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; opacity: 0; width: 50%; height: 100%;
}
/* Hover effect */
no-touch .grid-animation figure:hover img,
.grid-animation figure:hover img { -moz-transform: translateX(25%); -ms-transform: translateX(25%); -webkit-transform: translateX(25%); transform: translateX(25%); -webkit-filter: blur(3px); filter: blur(3px);
}
no-touch .grid-animation figure:hover p,
.grid-animation figure:hover p { opacity: 0;
}
.no-touch .grid-animation figure:hover figcaption,
.grid-animation figure:hover figcaption { opacity: 1; transform: rotateY(0deg); transition: transform 0.4s, opacity 0.1s;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <ul class="grid grid-animation"> <li> <figure> <img src="http://www.jachimowicz.de/images/reference/project-7/1-hi.jpg"> <p>jachimowicz.de</p> <figcaption> <h3>Responsive Microsite</h3> <span>Mobile first, responsive Microsite for Real Estate company in Berlin. Techniques used: CSS3 with animations, SASS, HTML 5, JavaScript, jQuery, Grunt</span> <a href="http://www.jachimowicz.de/">Zum Projekt</a> </figcaption> </figure> </li> <li> <figure> <img src="http://www.lychener35.de/images/bg-object-detail.jpg"> <p>www.lychener35.de</p> <figcaption> <h3>Responsive parallax site</h3> <span>JavaScript, SASS, Animations</span> <a href="http://www.lychener35.de/">Zum Projekt</a> </figcaption> </figure> </li>
</ul>
</body>
</html>
Figure caption hover effect - Script Codes CSS Codes
/* Variables */
/* Fonts */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300);
body { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 300; line-height: 1.5; letter-spacing: 0.05em;
}
/* Styles */
.grid { list-style: none; text-align: center; margin: 0 auto; padding: 2em; max-width: 80rem;
}
@media screen and (max-width: 35rem) { .grid { padding: 10px 10px 100px 10px; }
}
.grid li { text-align: left; display: inline-block; overflow: hidden; margin: 0; padding: 2em; position: relative; width: 28em; height: 21em;
}
@media screen and (max-width: 35rem) { .grid li { padding: 0; width: 100%; min-width: 300px; }
}
.grid figure { background-color: black; cursor: pointer; margin: 0; position: relative; height: 100%;
}
.grid figure img { opacity: 0.7; width: 100%; display: block; position: relative;
}
.grid figure p { -moz-transition: opacity 0.2s ease-in; -o-transition: opacity 0.2s ease-in; -webkit-transition: opacity 0.2s ease-in; transition: opacity 0.2s ease-in; color: white; text-align: center; background-color: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.5); -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; position: absolute; top: 50%; left: 50%; margin-top: -0.75em; margin-left: -6em; padding: 0.4em 0.6em; width: 12em;
}
.grid figcaption { color: white; font-size: 0.875em; background-color: black; padding: 1.2em; position: absolute; top: 0; left: 0; height: 100%;
}
.grid figcaption h3 { font-size: 1.2em; border-bottom: 1px solid white; margin: 0 0 0.5em 0; padding: 0 0 0.5em 0;
}
.grid figcaption a { color: white; font-size: 0.875em; text-align: center; text-decoration: none; border: 1px solid white; display: inline-block; padding: 0.45em 0.5em 0.5em 0.5em; position: absolute; bottom: 1.2em; right: 1.5em;
}
.grid figcaption a:hover, .grid figcaption a:active { background-color: white; color: black;
}
/* Animation */
.grid-animation li { perspective: 1700px; perspective-origin: 0 50%;
}
.grid-animation figure { -moz-transform-style: preserve-3d; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; overflow: hidden;
}
.grid-animation figure img { -moz-transition: -moz-transform 0.25s; -o-transition: -o-transform 0.25s; -webkit-transition: -webkit-transform 0.25s; transition: transform 0.25s;
}
.grid-animation figcaption { transform-origin: 0 0; -moz-transform: rotateY(-90deg); -ms-transform: rotateY(-90deg); -webkit-transform: rotateY(-90deg); transform: rotateY(-90deg); -moz-transition: -moz-transform 0.3s, opacity 0.1s 0.3s; -o-transition: -o-transform 0.3s, opacity 0.1s 0.3s; -webkit-transition: -webkit-transform 0.3s, opacity 0.1s; -webkit-transition-delay: 0s, 0.3s; transition: transform 0.3s, opacity 0.1s 0.3s; backface-visibility: hidden; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; opacity: 0; width: 50%; height: 100%;
}
/* Hover effect */
no-touch .grid-animation figure:hover img,
.grid-animation figure:hover img { -moz-transform: translateX(25%); -ms-transform: translateX(25%); -webkit-transform: translateX(25%); transform: translateX(25%); -webkit-filter: blur(3px); filter: blur(3px);
}
no-touch .grid-animation figure:hover p,
.grid-animation figure:hover p { opacity: 0;
}
.no-touch .grid-animation figure:hover figcaption,
.grid-animation figure:hover figcaption { opacity: 1; transform: rotateY(0deg); transition: transform 0.4s, opacity 0.1s;
}
Developer | Michaela |
Username | Fischaela |
Uploaded | July 27, 2022 |
Rating | 3.5 |
Size | 4,946 Kb |
Views | 60,720 |
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 |
Geildanke team | 4,153 Kb |
News reading experiment | 6,961 Kb |
Material design buttons | 4,381 Kb |
Geildanke typography | 3,249 Kb |
WebGL Template for ThreeJS | 2,713 Kb |
Pure CSS Navigation | 3,649 Kb |
Projects geildanke with new animations | 6,186 Kb |
Profile page scibble | 3,692 Kb |
Animation tests | 2,748 Kb |
IPad app prototype template | 2,396 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 |
Masonry | Uriuriuriu | 5,005 Kb |
Colorful Sliders | Chanrith | 1,246 Kb |
ASCII triangle image overlay | Mitchdot | 2,200 Kb |
Heartbeat | Apetrov | 2,079 Kb |
Free css icon set v2 - one div | Ben_jammin | 0 Kb |
The CodePen Logo | Kindofone | 4,259 Kb |
Google Fonts Sass Mixin | HugoGiraudel | 4,237 Kb |
JavaScript constructors | Simboonlong | 2,415 Kb |
Simple blog concept | Drew_mc | 2,666 Kb |
TweenMax transformOrigin Bubble | Nicolund | 2,209 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!