<link href="https://fonts.googleapis.com/css?family=Archivo+Black&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Archivo:700&display=swap" rel="stylesheet">
<div class="card">
<p>
Similar post
</p>
<h2>
How I recreated a Polaroid camera with CSS gradients only
</h2>
</div>
.card {
background-color: var(--background);
display: block;
width: 300px;
min-height: 90px;
border: 3px solid var(--primary);
padding: 15px;
margin: calc(50vh - 30px) auto 0 auto;
box-shadow: 10px -10px 0 -3px var(--background), 10px -10px var(--green),
20px -20px 0 -3px var(--background), 20px -20px var(--yellow),
30px -30px 0 -3px var(--background), 30px -30px var(--orange),
40px -40px 0 -3px var(--background), 40px -40px var(--red); transition: top 1s, left 1s;
position: relative;
top: 0;
left: 0;
cursor: pointer;
}
.card:hover {
top: -40px;
left: 40px;
}
:root {
--primary: #555BFF;
--secondary: #22D2A0;
--background: white;
--green: #1FC11B;
--yellow: #FFD913;
--orange: #FF9C55;
--red: #FF5555;
}
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
background-image: radial-gradient(var(--secondary) 30%, var(--background) 30%);
background-size: 2px 3px;
font-family: "Archivo", sans-serif;
color: var(--primary);
}
.card p {
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: 10px;
}
.card h2 {
font-size: 14px;
font-family: "Archivo Black", "Archivo", sans-serif;
font-weight: normal;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.