twitter-bootstrap - Chrome 没有给出引导代码的预期输出
问题描述
我正在使用引导程序。我已经添加了对引导库的所有必要引用,但它仍然无法在 google chrome 中运行。这是我得到的输出的屏幕截图:
我在“这是一个 Jumbotron”文本上使用了 jumbotron,但它不起作用。我的 HTML 代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Hello, world!</title>
</head>
<body>
<h1>Hello, world!</h1>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<div class="Jumbotron">
This is a Jumbotron.
</div>
</body>
</html>
如您所见,此代码中包含参考,但它仍然无法在 chrome 中使用。请注意,我已从 bootstrap.com 入门模板复制了此代码。那么,我的浏览器有问题吗?如果你知道答案,请回答这个问题。提前致谢。此代码没有 CSS。我还使用 Visual Studio Code 作为我的代码编辑器。
解决方案
我找到了答案:这与代码编辑器无关,而是我在 Chrome 中安装了一个扩展程序,它不允许我访问脚本链接(通过脚本网站)。一旦我删除了扩展(或者你可以尝试禁用它),引导程序又开始工作了。这个答案适用于任何面临与我相同问题的人。
推荐阅读
- python - 403 禁止访问使用 python-linkedin 库为 Linkedin API 拒绝发布共享
- sql-server - 组合不同表的部分
- javascript - 如何在 Reactjs Web 应用程序中使用媒体打印
- php - 获取“[img]XXXXX[/img]”标签之间的字符串 PHP
- hlsl - ComputeShader 中 SV_DispatchThreadID 的限制范围
- opencv - 在VS17上安装opencv 4.0时找不到文件precomp.hpp
- python-3.x - 连接来自 2 个存储桶的文件的云功能
- python - 通过交互式鼠标点调用 Python Zelle 图形 drawLine()
- c# - 在 ASP.NET Core 应用程序关闭时退出 Firefox Selenium Webdriver
- android - 无法加载 memtrack 模块:-2