Import and use google webfont

For a project, I have to use a lot of styles with a font. Here is the google font link

Here is my css import

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

I would like to know how to define a font family to display, for example, "Open Sans Light 300 Italic"

thanks

+8
css fonts google-font-api
source share
3 answers

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. */ } 
+24
source share

I think this is what you are looking for.

 body { font-family: "Open Sans"; font-weight: 300; font-style: italic; } 
+5
source share

300/400/700 - font. If you need bold, use

 font:bold(or 700) 12px/15px "Open Sans", sans-serif 

if you want to use light in italics

 font:300 italic 12px/15px "Open Sans", sans-serif 
+1
source share

All Articles