html - Google Font Roboto + Bootstrap,它们不兼容吗?
问题描述
这是我的头代码:
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="description" id="description" content="Unisciti alla nostra Community! Condividi le tue idee e trova qualsiasi cosa su One Piece ed altri Anime/Manga!">
<meta property="og:type" content="website" />
<meta property="og:title" content="One Piece Power" />
<meta property="og:description" content="Su One Piece Power potrai trovare qualsiasi cosa riguardande il mondo di One Piece: Episodi, Capitoli, Immagini, Video, Censure, Videogiochi, Guide e tanto altro! Che aspetti! Vieni a visitarci!" />
<meta property="og:image" content="/images/favicon.ico" />
<meta name="robots" content="index, follow">
<meta name="googlebot" content="index, follow">
<title>One Piece Power</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto&display=swap" async>
<link rel="stylesheet" href="styles.css" async>
<link rel="shortcut icon" href="/images/favicon.ico" async>
<link rel="dns-prefetch" href="onepiecepower.info" async>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="/spoiler.js"></script>
还有我的 style.css
body {
background-image: url("../../images/sfondo.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-color: #d6c3b1;
font-family: "Roboto";
font-weight: bold;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
overflow-x: hidden;
}
如果我在不导入引导程序的情况下添加此代码,它运行良好,但由于我输入了引导程序导入,它不再工作。
我的网站无法识别网站中的字体roboto。为什么?谢谢
解决方案
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<link rel="stylesheet" href="styles.css">
我的网站无法识别网站中的字体roboto。为什么?谢谢
最后,按指定顺序排序:如果两个声明具有相同的权重、来源和特异性,则后者指定获胜。导入样式表中的声明被认为在样式表本身的任何声明之前。
顺序很重要,因为当规则发生冲突时,顺序是决定哪一方获胜的一个因素。在这种情况下,无论哪种样式最后声明,都会获得首选项
推荐阅读
- sql - 数据透视表:如果参数之一为空,则加入同一记录
- delphi - Delphi Soap 服务器上的基本身份验证标头解析
- flutter - Flutter 状态管理,无法实时刷新
- timescaledb - Timescaledb 压缩、segmentby 和分块
- c# - CS8625 无法将 null 文字转换为 Interlocked.Exchange(ref c, null) 的不可为 null 的引用类型警告
- cuda - 像 rand() 这样的函数,在 CUDA _global_ 内核中生成随机数?
- c# - iis 上 .Net 应用程序中的内存缓存
- redis - 带扫描和获取的 Redis 管道
- powerbi - Power BI - 棒 2 过滤器表
- asp.net-mvc-5 - 当我添加范围滑块代码时,Html.BeginForm 给了我一个异常