How do I load an external source into a CSS / HTML document?

0

I'm trying to import an external source into a file CSS

So, this is my code CSS :

body{
    background-color: white
}

@font-face { 
   font-family: 'devgothic';
   src: url('/fonts/devgothic.eot');
   src: local('devgothic'), local('devgothic'), url('/fonts/devgothic.ttf') format('truetype');
}

.fonte {
    font-family: 'devgothic';
    color: purple;
}

Apparently, the folder structure is correct, but it just does not work.

    
asked by anonymous 08.05.2016 / 15:12

1 answer

1

The way you're doing is somewhat wrong. See the example below:

@font-face {
    font-family: 'Calibri';
    src: url('fonts/Calibri.eot');
    src: url('fonts/Calibri.eot?#iefix') format('embedded-opentype'),
        url('fonts/Calibri.woff') format('woff'),
        url('fonts/Calibri.ttf') format('truetype'),
        url('fonts/Calibri.svg#Calibri') format('svg');
    font-weight: normal;
    font-style: normal;
}

.palavra{
   font-family: "Calibri";
}
    
09.05.2016 / 14:22