网页引入谷歌字体

Google Fonts is a service provided for free by Google that allows access to thousands of fonts. All the available fonts are under Open Source licenses, meaning they’re free to use for both commercial and non-commercial projects.

Google字体是Google免费提供的一项服务,可访问数千种字体。 所有可用字体均已获得开源许可,这意味着它们可免费用于商业和非商业项目。

入门 (Getting started)

This article will go over using Google Fonts on a webpage. Below is what a boilerplate web page looks like right now:

本文将介绍如何在网页上使用Google字体。 下面是样板网页的外观:

And here’s the boilerplate HTML markup:

这是样板HTML标记:

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>My web page</title>
</head>
<body><h1>Welcome to my website</h1>
</body>
</html>

Pretty boring, huh? Let’s spice it up a little with a better font.

太无聊了吧? 让我们用更好的字体给它加一点香料。

选择字体 (Choosing your fonts)

It’s now time for us to choose our fonts. Head on over to fonts.google.com and select a font you like by pressing the little (+) (plus) button. I’m going to use Karla. Once you’ve picked out your font, expand the drawer on the bottom of the page.

现在是时候选择字体了。 转到fonts.google.com,然后按小( + )(加号)按钮选择所需的字体。 我要用Karla 。 选择字体后,展开页面底部的抽屉。

There are two ways to import the font for use. For the first method, copy the code in the code box under the Standard label. Now head on over back to your markup and add a the copied code and a style tag to the head of the document like this.

有两种导入字体以供使用的方法。 对于第一种方法,将代码复制到“ Standard标签下的代码框中。 现在,回到您的标记上,然后将复制的代码和样式标签添加到文档的开头,如下所示。

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>My web page</title><link href="https://fonts.googleapis.com/css?family=Karla&display=swap" rel="stylesheet">
</head>
<body><h1>Welcome to my website</h1>
</body>
</html>

You’ll notice from the URL example above that Google Fonts now supports the font-display property!

网页引入谷歌字体_在网页中使用Google字体相关推荐

  1. 更改word 默认字体_更改Word中的默认字体大小

    更改word 默认字体 Are you frustrated by always having to change the font size before you create a document ...

  2. 如何在下一个网页设计项目中使用Google字体

    by Hayden Mills 通过海登米尔斯 So you've probably heard that Google has hundreds of free web fonts ready to ...

  3. android ui设计最新字体,ui用什么字体_安卓ui设计用什么字体

    1 ui用什么字体 UI中字体使用的关键因素. 1.可读性. ui用什么字体_安卓ui设计用什么字体,可读性是UI中字体所需考虑的首要因素.字母字形必须清晰可辨,作为UI元素,其中不同的字母必须可以被 ...

  4. 计算机文档字体替换,在word中巧妙使用字体替换

    不知您是否遇到过这样的情况,当您使用Word文档时,很喜欢使用同一种字体来编辑文字,可如果是另外一台电脑没有你喜欢用的字体,希望把其中的某一种字体全部改为另一种字体,怎么解决呢?你会如何去完成这项工作 ...

  5. excel条形码字体_在Excel中批量生成条形码,竟如此简单!

    条形码可以标出物品的生产国.制造厂家.商品名称.生产日期.图书分类号.邮件起止地点.类别.日期等许多信息,因而在商品流通.图书管理.邮政管理.银行系统等许多领域都得到广泛的应用. 那么如何在Excel ...

  6. 前端电子表数字字体_爬虫:如何优雅应对字体反爬

    目录 THE BEGIN 一 什么是字体反爬 二 如何解密 1.人工解密 2.工具解密 三 建立映射关系 四 解密 THE BEGIN 网页数据爬取可以简单分为三步:抓取页面,分析页面,存储数据.其中 ...

  7. web字体设置成平方字体_如何托管自己的Web字体

    web字体设置成平方字体 字体通常是许多计算机用户的谜. 例如,您是否设计了一个精美的传单,并且将文件放在某个地方进行打印时,发现Arial中呈现的所有标题是因为打印机没有您在设计中使用的精美字体? ...

  8. android 使用 系统字体,Android_解析Android中使用自定义字体的实现方法,1、Android系统默认支持三种字 - phpStudy...

    解析Android中使用自定义字体的实现方法 1.Android系统默认支持三种字体,分别为:"sans", "serif", "monospace ...

  9. 原字体_在包装上玩转字体

    包装设计师在设计包装时会用什么字体?设计中文字体本就具有一定的复杂性,往往设计师会从现有字库中选择.但有很多包装设计师会让字体担当品牌的"形象大使",通过一套具有标志性的字体来打造 ...

最新文章

  1. 我们是如何陷入贫穷与忙碌的?
  2. android谷歌返色状态栏实例,Android实现状态栏(statusbar)渐变效果的示例
  3. php 过滤特殊字符和sql防注入代码以及xss攻击等
  4. winscp 自动断开无法连接_winscp教程,winscp教程,看完就学会的winscp教程
  5. 【绝对干货】TEASER前传之QUASAR:基于四元数的存在外点Wahba问题的可证明最优解
  6. vue一级分类和耳机分类_微服务项目第13天:商品分类业务的实现
  7. prettyping.sh: ping 之美
  8. 【最短路问题】leetcode743. 网络延迟时间
  9. ORACLE 36进制和10进制,互相转换函数
  10. Eclipse断点种类
  11. jquery chosen插件的使用(搜索查询下拉列表,多选)
  12. 配置跳转指定_SpaceVim 中自定义工程文件跳转
  13. 推荐一个开源 Java 小说网站项目
  14. 远程重装Win11系统图文教程
  15. 分析与提取QQ木马盗号技术
  16. 学习-Java循环while之求非负数之和
  17. 仙剑3安卓移植版_仙剑奇侠传3安卓版
  18. 数据结构——超全的数据结构思维导图
  19. 【BZOJ】1615: [Usaco2008 Mar]The Loathesome Hay Baler麻烦的干草打包机(模拟+bfs)
  20. 视频服务器(3) RTSP地址

热门文章

  1. MySQL数据库删除大量数据的方式
  2. 滴滴跨端框架 Chameleon 正式支持快应用
  3. Win10系统如何显示文件夹中的照片缩略图
  4. IPFS-Cluster 集群安装与验证测试
  5. React 调用手机,电脑摄像头扫描识别二维码
  6. 如何在win10 安装ADS1.2
  7. cisco路由器license的相关命令简单梳理
  8. 论文阅读笔记--Federated Continual Learning with Weighted Inter-client Transfer
  9. Github上的开源项目3
  10. Tenda u6 免驱无线网卡无法连接这个网络解决办法