Listo (Ctrl + Enter para ejecutar) Bootcamp Fullstack »
index.html
Tab = 4 espacios
1
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Efectos y Glassmorphism CSS3</title>
  <style>
    body {
      font-family: Arial, Helvetica, sans-serif;
      margin: 0;
      padding: 30px;
      /* Fondo colorido con círculos de gradiente */
      background: radial-gradient(circle at 10% 20%, #3b82f6 0%, #1e3a8a 90%);
      min-height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
    }

    /* Tarjeta estilo Glassmorphism */
    .tarjeta-glass {
      background: rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.35);
      border-radius: 20px;
      padding: 32px;
      max-width: 420px;
      color: white;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
      text-align: center;
    }

    .badge-cristal {
      display: inline-block;
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.3);
      padding: 4px 14px;
      border-radius: 20px;
      font-size: 0.8rem;
      font-weight: bold;
      text-transform: uppercase;
      margin-bottom: 15px;
      letter-spacing: 0.05em;
    }

    h2 {
      margin-top: 0;
      margin-bottom: 10px;
      font-size: 1.6rem;
      text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    p {
      color: rgba(255, 255, 255, 0.9);
      font-size: 0.95rem;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .btn-brillante {
      background: #ffffff;
      color: #1e3a8a;
      border: none;
      padding: 12px 28px;
      border-radius: 30px;
      font-weight: 700;
      font-size: 0.95rem;
      cursor: pointer;
      box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .btn-brillante:hover {
      transform: translateY(-2px);
      box-shadow: 0 15px 25px -5px rgba(0, 0, 0, 0.4);
    }
  </style>
</head>
<body>

  <div class="tarjeta-glass">
    <span class="badge-cristal">Glassmorphism</span>
    <h2>Diseño con Efecto Cristal</h2>
    <p>
      Esta tarjeta utiliza <code>backdrop-filter: blur(16px)</code> y un fondo RGBA semitransparente, permitiendo que la luz del gradiente inferior se filtre suavemente con elegancia moderna.
    </p>
    <button class="btn-brillante" onclick="alert('¡Efecto Glassmorphism activo!')">
      Explorar Componente &raquo;
    </button>
  </div>

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