Text Blocks Over Image, Updated
How do I make an text blocks over image, updated?
Moderized and improved from http://css-tricks.com/text-blocks-over-image/.. What is a text blocks over image, updated? How do you make a text blocks over image, updated? This script and codes were developed by KatieK on 12 January 2023, Thursday.
Text Blocks Over Image, Updated - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Text Blocks Over Image, Updated</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='css/abcei.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Text Blocks Over Image, Updated</h1>
<figure> <img src="http://baconmockup.com/501/351" /> <figcaption> <span> sausage pork belly frankfurter <span class='spacer'></span> <br /> <span class='spacer'></span> bacon ipsum dolor sit amet </span> </figcaption>
</figure>
<p>Modernized and improved from <a href="https://css-tricks.com/text-blocks-over-image/">https://css-tricks.com/text-blocks-over-image/</a>.</p>
<h3>Key Updates</h3>
<ul> <li>Positioning the <code>h2</code> by <code>bottom</code> pins the caption to the <em>bottom</em> of the image.</li> <li>Reset bg color declaration on spacer element.</li>
<!-- <li>Used <code>:before</code> and <code>:after</code> for line-break spacing.</li> --> <li>Switched to <a href="http://baconipsum.com/">http://baconipsum.com/</a> and <a href="http://baconmockup.com">http://baconmockup.com</a> for better BEO.</li> <li>Semantcized to figure/figcaption markup.</li>
</ul>
</body>
</html>
Text Blocks Over Image, Updated - Script Codes CSS Codes
figure { position: relative;
}
figure img { display: block; /* removes trailing whitespace */ outline: solid #000 1px;
}
figcaption { position: absolute; bottom: 10%; width: 501px; margin: 0; font-size: 1.5rem; font-weight: bold; line-height: 200%; text-transform: capitalize;
}
figcaption span { color: white; background: black; /* fallback */ background: rgba(0, 0, 0, 0.7); padding: .5em;
}
figcaption span.spacer { padding: 0 5px; background: transparent;
}
figcaption span.spacer::before { content: " ";
}
Developer | KatieK |
Username | KatieK2 |
Uploaded | January 12, 2023 |
Rating | 3 |
Size | 3,122 Kb |
Views | 6,072 |
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 |
Placeholder Images | 3,621 Kb |
SVG Experiments with coordinate system transforms | 4,004 Kb |
SVG - 2 Colors in CSS | 3,319 Kb |
Reverse the String | 2,911 Kb |
Transparent Textures | 4,276 Kb |
Experiments with Vertical Centering | 3,924 Kb |
Fun with Clipping | 2,971 Kb |
Flexbox Buildup | 2,545 Kb |
Grid with Collapsing Borders | 2,468 Kb |
Dadgumit, Blowouts | 4,451 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 |
Classy Blockquote Styling | Andrewwright | 3,212 Kb |
Custom checkbox example | Capelo | 3,495 Kb |
CSS Letter animations | Sladix | 2,116 Kb |
A Pen by utcwebdev | Utcwebdev | 2,856 Kb |
SVG Circle Progress | JMChristensen | 3,368 Kb |
Border image | JohnRiordan | 2,120 Kb |
Animated css matrix type | NielsOeltjen | 3,484 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Mapbox Directions with geolocation tracking | Pollardld | 5,827 Kb |
Vertical Pan Hammer.js example | Jtangelder | 2,144 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!