Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

501
Vistas
How can i change the font-family of SweetAllert.js?

I am having a problem with changing the font-family of a sweetalert.

The script is bellow:

swal({
          title: "Success!",
          text: "You created your team.That's amazing!",
          type: "success",
          timer: 2000,
          showConfirmButton: false
        }, function(){
              window.location.href = "/generatelinkQR.php";
        });

I have so far tried to change the css with .swal2-popup but it did not work. Any suggestions? Thank for your time.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can directly style .swal-modal which is used by sweet alert to display the dialog box.

(I have updated your code to use the latest version of sweet alert, as it seems you were using an old version).

@import url('https://fonts.googleapis.com/css2?family=Kdam+Thmor+Pro&display=swap');

.swal-modal{
  font-family: 'Kdam Thmor Pro', sans-serif;
}
<html>

<head>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>

<body>
  <script>
    swal({
      title: "Success!",
      text: "You created your team.That's amazing!",
      icon: "success",
      timer: 2000,
      button: false
    }).then(value => {
      window.location.href = "/generatelinkQR.php";
    });
  </script>
</body>

</html>

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda