Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

57
Vistas
React and Tailwind Custom Fonts from ttf file

Hey i want to add some custom fonts from files.

These are the font files that i want to load.

These are the font files

My index.css

body {
  margin: 0;
  padding: 0;
}

@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500&display=swap");

@tailwind base;
@tailwind components;

@tailwind utilities;

Thanks in advance

7 months ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you don't mind spending time getting the relative path to each of the fonts, you can do this

/* local if the font is installed */
@font-face {
    font-family: 'Font Name';
    src: local('Font Name'), url("./FontName.ttf") format('truetype');
}
7 months 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 empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.