We live as we dream: alone
What is a CSS image caption?
A CSS image caption is a descriptive text that accompanies an image, providing context or additional information. It’s typically displayed below or above the image. Here's an example:
HTML
<div class="demo-content">
<div class="demo-caption">We live as we dream - alone</div>
</div>
CSS
.demo-content {
height: 40vh;
background-image: url("demo-bg.jpg");
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.demo-caption {
background-color: rgba(85, 108, 66, 0.6);
color: rgba(255, 255, 255, 0.4);
padding: 1rem;
width: 100%;
font-family: 'Oswald', sans-serif;
font-size: 2.4em;
line-height: 1.1em;
text-transform: uppercase;
text-align: center;
}
Arrow at the bottom
Arrow at the bottom with a utf-8 character
Arrow at the top of a container
Aside
Background color
Blackboard design
Breadcrumbs design
Calendar design
Checkboxes as circular buttons
Checkboxes as toggle switches
Cursor properties
Circular image with a shadow effect
Font Awesome pulled icons
Gallery picture frame with a price ribbon
Google pie chart
Google web fonts
Last child and not last child element
Letter spacing
List items with a Font Awesome icon
Neon text
Neon text with a flickering effect
Notebook paper background
Radio buttons as circular buttons
Radio buttons as rating stars
Remove the glow effect from an input field
Search bar with categories
Track (audio/video subtitles)
Web fonts
Whiteboard design