Files
uni/slides/223015c/assets/demos/css-pseudo-elements.html

34 lines
959 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Pseudo-Elemente</title>
<style>
body { padding: 1.2rem; font-family: system-ui, sans-serif; font-size: 14px; }
.required::before {
content: "* ";
color: red;
}
p.drop::first-letter {
font-size: 2em;
font-weight: bold;
color: #d63384;
float: left;
line-height: 1;
padding-right: 4px;
}
label { display: block; margin-top: 10px; }
input { padding: 4px 8px; border: 1px solid #9ca3af; border-radius: 3px; margin-top: 3px; }
h3 { margin: 0.6rem 0 0.3rem; font-size: 0.95rem; }
</style>
</head>
<body>
<h3>::before (Pflichtfeld-Sternchen)</h3>
<label class="required">E-Mail-Adresse</label>
<input type="email">
<h3>::first-letter (Initial-Buchstabe)</h3>
<p class="drop">Lorem ipsum dolor sit amet. Der erste Buchstabe wird per CSS hervorgehoben kein extra HTML nötig.</p>
</body>
</html>