Import and use google webfont

大兔子大兔子 提交于 2019-12-03 12:51:24

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. */
        }

I think this is what you're looking for.

body {
  font-family: "Open Sans";
  font-weight: 300;
  font-style: italic;
}

300/400/700 is font-weight. If you want bold font use

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

if you want light italic use

font:300 italic 12px/15px "Open Sans", sans-serif
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!