Bootstrap CSS在Chrome或Firefox中不起作用 [英] Bootstrap CSS not working in chrome or firefox
问题描述
我写了一个基本的"Hello World"网页,并从CDN添加了引导CSS,但它仅在Microsoft Edge中有效. Google Chrome和Mozilla Firefox无法显示正确的输出.
I wrote a basic "Hello World" web page and added bootstrap CSS from CDN but it is working only in Microsoft Edge. Google Chrome and Mozilla Firefox are not displaying the correct output.
请帮助我解决此问题.
正确的Microsoft Edge输出
Correct Microsoft Edge Output
错误的Google Chrome输出
Incorrect Google Chrome Output
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<title>Shadow Shop</title>
</head>
<body class="container-fluid">
<div class="jumbotron">
<h1>Hello World</h1>
</div>
</body>
</html>
推荐答案
我终于找到了解决问题的方法!
I found the solution to the problem finally!!
此问题是由于在保存文件时实施了字符编码引起的.在Atom编辑器中,默认保存为UTF-16LE.但是,需要UTF-8.
This problem was caused due to the character encoding being implemented while saving the file. In Atom editor, the default saving was in UTF-16LE. But, UTF-8 was required.
更改编码后,问题就解决了.
Once I changed the encoding, the problem was solved.
这篇关于Bootstrap CSS在Chrome或Firefox中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!