Pseudo elements
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Stylized Quote Box with Pseudo-elements</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background-color: #f0f0f0;
}
.quote-box {
position: relative;
max-width: 500px;
padding: 30px;
background-color: #ffffff;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
border-radius: 8px;
}
.quote-box::before,
.quote-box::after {
content: '"';
position: absolute;
font-size: 100px;
color: #e0e0e0;
font-family: Georgia, serif;
font-style: italic;
}
.quote-box::before {
top: -50px;
left: 10px;
}
.quote-box::after {
bottom: -50px;
right: 10px;
transform: rotate(180deg);
}
.quote-text {
font-size: 24px;
line-height: 1.4;
color: #333;
margin-bottom: 20px;
}
.quote-author {
font-size: 18px;
color: #666;
text-align: right;
}
.quote-author::before {
content: "— ";
}
</style>
</head>
<body>
<div class="quote-box">
<p class="quote-text">The only way to do great work is to love what you do.</p>
<p class="quote-author">Steve Jobs</p>
</div>
</body>
</html>
You can view it live here.
No comments to display
No comments to display