Bootstrap CSS在Chrome或Firefox中不起作用 [英] Bootstrap CSS not working in chrome or firefox

查看:239
本文介绍了Bootstrap CSS在Chrome或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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆