Listo (Ctrl + Enter para ejecutar) Bootcamp Fullstack »
index.html
Tab = 4 espacios
1
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Colores y Gradientes CSS3</title>
  <style>
    body {
      font-family: Arial, Helvetica, sans-serif;
      background-color: #f8fafc;
      padding: 30px;
      color: #0f172a;
    }

    .rejilla-muestras {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 20px;
      max-width: 900px;
    }

    .caja {
      padding: 24px;
      border-radius: 12px;
      color: white;
      text-align: center;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    /* 1. Gradiente lineal violeta-azul */
    .caja-gradiente-1 {
      background: linear-gradient(135deg, #6366f1 0%, #3b82f6 100%);
    }

    /* 2. Gradiente cálido atardecer */
    .caja-gradiente-2 {
      background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    }

    /* 3. Gradiente esmeralda moderno */
    .caja-gradiente-3 {
      background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    }

    /* 4. Caja con fondo RGBA sobre fondo con patrón */
    .caja-rgba {
      background-color: rgba(15, 23, 42, 0.88);
      border: 1px solid rgba(255, 255, 255, 0.2);
    }

    h3 {
      margin-top: 0;
      margin-bottom: 8px;
      font-size: 1.15rem;
    }

    p {
      margin: 0;
      font-size: 0.85rem;
      opacity: 0.9;
    }
  </style>
</head>
<body>

  <h2>Estudio de Colores y Fondos en Kilopolis</h2>
  <p style="color: #64748b; margin-bottom: 25px;">
    Degradados generados 100% con código CSS puro sin dependencias de imágenes:
  </p>

  <div class="rejilla-muestras">
    <div class="caja caja-gradiente-1">
      <h3>Tecnología</h3>
      <p>linear-gradient (Azul / Violeta)</p>
    </div>

    <div class="caja caja-gradiente-2">
      <h3>Energía</h3>
      <p>linear-gradient (Ámbar / Rojo)</p>
    </div>

    <div class="caja caja-gradiente-3">
      <h3>Crecimiento</h3>
      <p>linear-gradient (Esmeralda)</p>
    </div>

    <div class="caja caja-rgba">
      <h3>Modo Oscuro</h3>
      <p>rgba(15, 23, 42, 0.88)</p>
    </div>
  </div>

</body>
</html>
Haz clic para editar este código
Vista Previa
Motor de Render CSS3