Oggi vedremo come utilizzare un font personalizzato usando il css.
Prima di tutto dobbiamo trovare o creare un nuovo font io ne ho trovato uno in formato tff,
ma lo snippet scritto funziona anche con altri tipi di file.
Pagina Html
1 2 3 4 5 6 7 8 9 10 |
<!DOCTYPE html> <html> <head> <title>Font Personalizzato</title> <link href='style.css' rel='stylesheet' type='text/css'> </head> <body> <p>Test</p> </body> </html> |
Foglio di Stile
1 2 3 4 5 6 7 8 9 10 11 |
@font-face { font-family: 'BloodLust'; src: url('bloodlust.eot?') format('eot'), url('bloodlust.woff') format('woff'), url('bloodlust.ttf') format('truetype'), url('bloodlust.svg#svgFontName') format('svg'); } p{font-family:"BloodLust", Times, serif;} p{font-size:200px} |