在html中源sans pro字体 [英] Source sans pro font in html

查看:872
本文介绍了在html中源sans pro字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我的HTML网站的CSS中的font-family属性中使用Googlesans pro字体。我使用Bootstrap作为前端框架。

I would like to use googles "source sans pro" font in the font-family attribute in CSS, in my HTML site. I use Bootstrap as a front end framework.

https:// www.google.com/fonts/specimen/Source+Sans+Pro

我该如何做到这一点?
我是否必须将文件包含到我的html网站?

How can I achieve that? Do I have to include the file into my html site?

感谢您的帮助!

Thank you for any help!

推荐答案

头部部分的网站中添加此字符串:

Add this string in head section of your site:

<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro' rel='stylesheet' type='text/css'>

然后使用这种字体:

Then use this font:

h1 {
  font-family: 'Source Sans Pro', sans-serif;
}

这篇关于在html中源sans pro字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆