Back to CSS Code Blocks Glow-Effect & Neon Tech Code Block Pure CSS
Share
HTML
<section class="ccb-neo" aria-label="Neon tech code block demo">
  <div class="ccb-neo__panel">
    <div class="ccb-neo__scan">
      <span class="ccb-neo__blip" aria-hidden="true"></span> sys.core // online
      <span class="ccb-neo__id">0xCF-77</span>
    </div>
    <pre class="ccb-neo__pre"><code><span class="ccb-neo__c">// boot the grid runtime</span>
<span class="ccb-neo__k">fn</span> <span class="ccb-neo__f">main</span>() -&gt; Result&lt;()&gt; {
    <span class="ccb-neo__k">let</span> grid = Grid::<span class="ccb-neo__f">connect</span>(<span class="ccb-neo__s">"neon://core"</span>)?;
    grid.<span class="ccb-neo__f">pulse</span>(<span class="ccb-neo__n">144</span>).<span class="ccb-neo__f">await</span>;
    <span class="ccb-neo__k">Ok</span>(())
}</code></pre>
  </div>
</section>
CSS
/* ─── 06 Glow-Effect & Neon Tech Code Block ──────── */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@500;700;900&display=swap');

.ccb-neo {
  --ccb-neo-cyan:    #22d3ee;
  --ccb-neo-magenta: #f0f;
  --ccb-neo-lime:    #a3ff12;

  width: 100%;
  min-height: 320px;
  background: #05060a;
  background-image:
    linear-gradient(rgba(34,211,238,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.05) 1px, transparent 1px),
    radial-gradient(900px 500px at 50% -10%, rgba(255,0,255,.12), transparent 60%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
  color: #e6f7ff;
  font-family: 'Orbitron', sans-serif;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 22px;
  box-sizing: border-box;
}
.ccb-neo *, .ccb-neo *::before, .ccb-neo *::after { box-sizing: border-box; }

.ccb-neo__panel {
  position: relative;
  width: 100%; max-width: 580px;
  background: rgba(8,12,20,.55);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(34,211,238,.5);
  border-radius: 14px;
  box-shadow:
    0 0 18px rgba(34,211,238,.35),
    0 0 50px rgba(34,211,238,.18),
    inset 0 0 24px rgba(34,211,238,.06);
  overflow: hidden;
  animation: ccb-neo-pulse 3.4s ease-in-out infinite;
}
@keyframes ccb-neo-pulse {
  0%, 100% {
    box-shadow:
      0 0 18px rgba(34,211,238,.35),
      0 0 50px rgba(34,211,238,.18),
      inset 0 0 24px rgba(34,211,238,.06);
  }
  50% {
    box-shadow:
      0 0 26px rgba(255,0,255,.45),
      0 0 64px rgba(255,0,255,.22),
      inset 0 0 28px rgba(255,0,255,.08);
  }
}
.ccb-neo__scan {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(34,211,238,.25);
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ccb-neo-cyan); text-shadow: 0 0 8px var(--ccb-neo-cyan);
}
.ccb-neo__blip {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ccb-neo-lime);
  box-shadow: 0 0 12px var(--ccb-neo-lime);
}
.ccb-neo__id {
  margin-left: auto; color: var(--ccb-neo-magenta);
  text-shadow: 0 0 8px var(--ccb-neo-magenta);
}
.ccb-neo__pre {
  margin: 0; padding: 22px 22px 26px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 14px; line-height: 1.95;
  color: #cdfaff; overflow-x: auto;
  text-shadow: 0 0 6px rgba(34,211,238,.4);
}
.ccb-neo__k { color: var(--ccb-neo-magenta); text-shadow: 0 0 8px var(--ccb-neo-magenta); }
.ccb-neo__f { color: var(--ccb-neo-cyan);    text-shadow: 0 0 8px var(--ccb-neo-cyan); }
.ccb-neo__s { color: var(--ccb-neo-lime);    text-shadow: 0 0 8px var(--ccb-neo-lime); }
.ccb-neo__c { color: #5b7488; text-shadow: none; font-style: italic; }
.ccb-neo__n { color: #ffb86c; text-shadow: 0 0 8px rgba(255,184,108,.6); }
.ccb-neo__pre::-webkit-scrollbar       { height: 8px; }
.ccb-neo__pre::-webkit-scrollbar-thumb { background: var(--ccb-neo-cyan); border-radius: 8px; box-shadow: 0 0 10px var(--ccb-neo-cyan); }

@media (prefers-reduced-motion: reduce) {
  .ccb-neo__panel { animation: none; }
}