Back to CSS Blockquotes Drop Shadow Float Pure CSS
Share
HTML
<figure class="cbq-float">
  <blockquote>
    <p>"You can have the best engine in the world, but without a chassis it's just noise."</p>
  </blockquote>
  <figcaption>— Eli Tan, CTO</figcaption>
</figure>
CSS
.cbq-float {
  max-width: 320px;
  padding: 24px;
  background: #18181f;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 24px rgba(124, 108, 255, 0.18);
  transform: translateY(0);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  font-family: system-ui, sans-serif;
  color: #f0eeff;
}

.cbq-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(124, 108, 255, 0.32);
}

.cbq-float blockquote {
  margin: 0;
}

.cbq-float p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
}

.cbq-float figcaption {
  margin-top: 14px;
  font-size: 12px;
  color: #a78bfa;
}