为什么我不能在同一个 html 文件中使用 bootstrap 和字体 link?

Why i can't use bootstrap and font link in same html file?

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">

我正在使用这两个链接,但未应用于我的文件。

你可以同时使用它们,应该没有问题。

要将字体应用到您的站点,您还需要一些 CSS 规则。这些还需要比 boostrap 文件中的优先级更高,或者具有相同的优先级但在 bootstrap 文件之后应用。

你能更具体一点吗,什么地方不起作用?您是否尝试过更改要更改其字体的元素的字体系列?这是应用于正文的字体。

body {
  font-family: 'Lato', sans-serif;
}
<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet">
  <title>JS Bin</title>
</head>

<body>
  <h1>Hello World</h1>
</body>

</html>

https://jsbin.com/wotusas/