Bootstrap:更改Web浏览器上未显示的基本代码

时间:2017-03-05 12:09:29

标签: html css twitter-bootstrap

我是bootstrap的新手,当我复制粘贴来自bootstrap网站的基本代码并运行它完美运行并显示“Hello,World”但是当我做了一个最小的改变,如“hello world”到“world”它仍然显示“hello world”以下是代码

 <!DOCTYPE html>
    <html lang = "en">
       
       <head>
          <meta charset = "utf-8">
          <meta http-equiv = "X-UA-Compatible" content = "IE = edge">
          <meta name = "viewport" content = "width = device-width, initial-scale = 1">
          
          <title>Bootstrap 101 Template</title>
          
          <!-- Bootstrap -->
          <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet">
          
          <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
          <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
          
          <!--[if lt IE 9]>
          <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
          <![endif]-->
          
       </head>
       
       <body>
          <h1>Hello, world!</h1>
          
          <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
          <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
          
          <!-- Include all compiled plugins (below), or include individual files as needed -->
          <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
          
       </body>
    </html>

1 个答案:

答案 0 :(得分:1)

没有发现问题..工作正常..

打印你好。世界

 <!DOCTYPE html>
    <html lang = "en">
       
       <head>
          <meta charset = "utf-8">
          <meta http-equiv = "X-UA-Compatible" content = "IE = edge">
          <meta name = "viewport" content = "width = device-width, initial-scale = 1">
          
          <title>Bootstrap 101 Template</title>
          
          <!-- Bootstrap -->
          <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet">
          
          <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
          <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
          
          <!--[if lt IE 9]>
          <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
          <![endif]-->
          
       </head>
       
       <body>
          <h1>Hello, world!</h1>
          
          <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
          <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
          
          <!-- Include all compiled plugins (below), or include individual files as needed -->
          <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
          
       </body>
    </html>

打印世界

 <!DOCTYPE html>
    <html lang = "en">
       
       <head>
          <meta charset = "utf-8">
          <meta http-equiv = "X-UA-Compatible" content = "IE = edge">
          <meta name = "viewport" content = "width = device-width, initial-scale = 1">
          
          <title>Bootstrap 101 Template</title>
          
          <!-- Bootstrap -->
          <link href = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel = "stylesheet">
          
          <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
          <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
          
          <!--[if lt IE 9]>
          <script src = "https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src = "https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
          <![endif]-->
          
       </head>
       
       <body>
          <h1>world!</h1>
          
          <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
          <script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
          
          <!-- Include all compiled plugins (below), or include individual files as needed -->
          <script src = "//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
          
       </body>
    </html>

您没有正确保存文件。 当您尝试仅打印world..try以更改文件的名称并运行它时。

另一件事可能是你的浏览器缓存文件清除缓存。

你的代码没有问题。