Listo (Ctrl + Enter para ejecutar) Bootcamp Fullstack »
index.html
Tab = 4 espacios
1
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <title>Demostración de Iframes HTML5</title>
  <style>
    body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; padding: 20px; background: #f8fafc; color: #1e293b; }
    .container { max-width: 620px; margin: 0 auto; }
    .card { background: white; border: 1px solid #cbd5e1; border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); }
    .media-box {
      position: relative;
      width: 100%;
      border-radius: 8px;
      overflow: hidden;
      border: 1px solid #e2e8f0;
      background: #0f172a;
      margin-top: 10px;
    }
    .video-aspect {
      aspect-ratio: 16 / 9;
    }
    .map-aspect {
      height: 280px;
    }
    iframe {
      width: 100%;
      height: 100%;
      border: none;
      display: block;
    }
    .badge {
      display: inline-block;
      padding: 3px 8px;
      border-radius: 4px;
      font-size: 0.75rem;
      font-weight: 600;
      background: #e0f2fe;
      color: #0369a1;
      margin-bottom: 8px;
    }
  </style>
</head>
<body>

<div class="container">

  <!-- 1. Video de Naturaleza en 4K desde YouTube -->
  <div class="card">
    <span class="badge">YouTube 4K Ultra HD</span>
    <h3 style="margin: 0; color: #0f172a;">Video de Naturaleza en 4K</h3>
    <p style="font-size: 0.88rem; color: #64748b; margin: 6px 0 12px 0;">
      Incrustado usando el reproductor responsivo de YouTube con privacidad mejorada:
    </p>

    <div class="media-box video-aspect">
      <iframe src="https://www.youtube-nocookie.com/embed/LXb3EKWsInQ" 
              title="Costa Rica en 4K Ultra HD - Naturaleza" 
              loading="lazy"
              allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" 
              allowfullscreen>
      </iframe>
    </div>
  </div>

  <!-- 2. Mapa Interactivo de Google Maps: Pereira, Colombia -->
  <div class="card">
    <span class="badge">Google Maps Interactivo</span>
    <h3 style="margin: 0; color: #0f172a;">Mapa de Pereira, Colombia</h3>
    <p style="font-size: 0.88rem; color: #64748b; margin: 6px 0 12px 0;">
      Vista satelital y callejera de la ciudad de Pereira (Eje Cafetero):
    </p>

    <div class="media-box map-aspect">
      <iframe src="https://maps.google.com/maps?q=Pereira,+Risaralda,+Colombia&amp;t=&amp;z=13&amp;ie=UTF8&amp;iwloc=&amp;output=embed" 
              title="Mapa de Pereira, Risaralda, Colombia" 
              loading="lazy"
              allowfullscreen>
      </iframe>
    </div>
  </div>

</div>

</body>
</html>
Haz clic para editar este código
Vista Previa
Navegador / HTML5