Import and use google webfont

Romain picture Romain · Oct 3, 2013 · Viewed 48.6k times · Source

For a project, I have to use many style off a font. Here is the link of the google font

Here is my css import

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);

What I would like to know is how can I define the font-family to display for example the "Open Sans Light 300 Italic"

Thanks

Answer

user2578173 picture user2578173 · Oct 3, 2013

CSS

@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,300,400,700);
        body {
            font-family: 'Open Sans', sans-serif;
        }

        body p {
            font-style: italic;
            font-weight: 300; /* You specify the number you see next to the fonts to change from light to bold ie you would put 700 etc. etc. */
        }