我想让登录页面使用引导和反应。我使用来自官方页面的以下风格。我在index.html文件中添加了这些引导和css文件:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link href="all.css" rel="stylesheet">
<link href="autorization.css" rel="stylesheet">
<link href="bootstrap.min.css" rel="stylesheet">
<title>React App</title>
</head>
<body>
<div id="root"></div>
</body>
<script src="bootstrap.bundle.min.js"></script>
<script src="jquery.min.js"></script>
</html>但结果与我打开普通html页面时不同。字体不一样。
它应该是这样的:

这就是我所拥有的

我不明白为什么,因为我没有改变css文件..。
发布于 2018-09-20 05:46:07
这可能是index.js文件的问题所在。在这里您可以删除导入index.css行。
删除index.js文件中的这一行。
import './index.css';发布于 2018-09-20 05:45:14
您可能会在从BS重新写入CSS样式规则之后加载另一个CSS文件,或者引导CSS文件未加载后,请在控制台或浏览器中检查它是从哪个样式应用的,就像第一个文件一样。
发布于 2020-10-20 17:23:20
你可以用重要的东西来支配;
示例:
字体-家庭:‘丽丽塔一号’!重要;
https://stackoverflow.com/questions/52418292
复制相似问题