HTML
<!DOCTYPE html>
<html lang=”hr”>
<head>
<meta charset=”UTF-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1.0″>
<title>Citati</title>
<link rel=”stylesheet” href=”cs2.css”>
</head>
<body>
<div class=”quote quote1″>”Mudrost počinje u čuđenju.” – Sokrat</div>
<div class=”quote quote2″>”Budi promjena koju želiš vidjeti u svijetu.” – Gandhi</div>
<div class=”quote quote3″>”Sreća nije nešto gotovo. Dolazi iz tvojih vlastitih djela.” – Dalaj Lama</div>
<div class=”quote quote4″>”Ne možemo riješiti probleme koristeći isti način razmišljanja kojim smo ih stvorili.” – Einstein</div>
<div class=”quote quote5″>”Samo je jedna stvar gora od toga da pričaju o tebi, a to je da ne pričaju.” – Oscar Wilde</div>
</body>
</html>
CSS
/* Općenite postavke za sve citate */
.quote {
padding: 15px;
max-width: 400px;
border-radius: 10px;
text-align: center;
font-size: 18px;
position: absolute;
}
/* Citat 1 – Pravokutnik */
.quote1 {
background-color: #007bff;
color: white;
font-family: Arial, sans-serif;
top: 10%;
left: 10%;
border-radius: 5px;
}
/* Citat 2 – Elipsa */
.quote2 {
background-color: #ffeb3b;
color: black;
font-family: Georgia, serif;
font-style: italic;
top: 10%;
right: 10%;
border-radius: 50px;
padding: 20px 40px;
}
/* Citat 3 – Krug */
.quote3 {
background-color: #e0e0e0;
color: #0d47a1;
font-family: “Courier New”, monospace;
font-weight: bold;
top: 40%;
left: 50%;
transform: translateX(-50%);
width: 200px;
height: 200px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
/* Citat 4 – Oblik s kosim rubovima */
.quote4 {
background-color: #ff5252;
color: white;
font-family: Verdana, sans-serif;
border-left: 5px solid white;
bottom: 10%;
left: 10%;
clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
padding: 20px;
}
/* Citat 5 – Dijamant */
.quote5 {
background-color: #9c27b0;
color: #f5f5f5;
font-family: Tahoma, sans-serif;
font-size: 20px;
bottom: 10%;
right: 10%;
width: 200px;
height: 200px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
transform: rotate(45deg);
}
/* Responsive dizajn */
@media (max-width: 600px) {
.quote {
position: static;
max-width: 90%;
margin: 10px auto;
font-size: 16px;
transform: none;
width: auto;
height: auto;
border-radius: 10px;
clip-path: none;
}
}