简体   繁体   English

Boostrap在WAMP服务器上不起作用

[英]Boostrap not working on WAMP server

My html, css and bootstrap look fine when I view them on my MAC in chrome and safari. 当我在chrome和safari中的MAC上查看它们时,我的html,css和bootstrap看起来很好。 However, when I view it on the WAMP server (Windows XP pro) the Bootstrap does not seem to be implementing. 但是,当我在WAMP服务器(Windows XP pro)上查看它时,Bootstrap似乎没有实现。 The CSS seems like it still works fine. CSS似乎仍然可以正常工作。

HTML: 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">
    <link href="/Users/Pat/Downloads/bootstrap-3.3.2-dist/css/bootstrap.css" rel="stylesheet" media="all">
    <link rel="stylesheet" href="Website_Layout.css">  
    <title>Home</title>
  </head>

  <body>

    <nav class="nav">
      <div class="container-fluid">
        <ul class="nav nav-pills nav-justified">
          <li><a href="Website.html">Home</a></li>
          <li><a href="Projects.html">Projects</a></li>
          <li><a href="Team.html">Team</a></li>
          <li><a href="Contact.html">Contact</a></li>
        </ul>
      </div>
    </nav>

    <div class="jumbotron">
      <div class="container-fluid">
        <h1>Safron Technologies</h1>
        <p>Social Media Application Specialists</p>
      </div>
    </div>

    <div class="fuel">
      <div class="container-fluid">
        <h1>What Fuels Us?</h1>
        <p>We love building apps that change the way media is processed and viewed. Our apps will change your everyday life.</p>
      </div>  
    </div>

    <div class="learn-more">
      <div class="container-fluid">
          <div class="row">
            <div class="col-md-6">
              <h2>Development</h2>
            <p>We specialize in creating IOS Apps with the sole purpose of connecting people, products and ideas.</p>
            </div>
            <div class="col-md-6">
              <h2>Innovation</h2>
            <p>Safron Technologies is on the cutting edge of Social Media Application Development. We have the knowledge and experience to produce sucessful worldwide applications.</p>
            </div>
          </div>
      </div>
    </div>

    <nav class="nav2">
      <div class="container-fluid">
        <div class="row">
          <div class="col-md-3">
            <h1>Contact Us</h1>
            <p>(610) 639-7475</p>
            <p>safrontechnolo.g@gmail.com</p>
          </div>  
          <div class="col-md-3">
            <h2>Inside Safron</h2>
            <ul>
              <li><a href="Projects.html">Projects</a></li>
              <li><a href="Team.html">Team</a></li>
              <li><a href="Contact.html">Contact</a></li>
            </ul>  
          </div>  
        </div>  
      </div>
    </nav>

  </body>

</html>

CSS: CSS:

.nav {
  width: 100%;
  float: top;
  position: fixed;
  margin: 0px 0px 0px 0px;
  padding: 0px;
  background-color: black;
  height: 60px;
  z-index: 100;
}

.nav ul {
  list-style: none;
  width: 800px;
  margin-left: 300px;
  margin-right: 300px;
  padding: 0px;
  text-align: center;
}

.nav li a {
  display: block;
  padding: 20px 20px;
  color: white;
  font-size: 16px;
  text-transform: uppercase;
}

.nav li a:hover {
  color: #FF6600;
  background-color: white;
  height: 60px;
}

.jumbotron {
  background-image: url("/Users/Pat/Documents/Safron_Mountain.jpeg");
  height: 880px;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 0;
}

.jumbotron h1 {
  font-size: 64px;
  text-align: center;
  color: #FF7F50;
  text-shadow: -1.2px 0 black, 0 1.2px black, 1.2px 0 black, 0 -1.2px black;
  font-weight: bold;
  font-family: 'Shift',sans-serif;
  padding-top: 15px;
  padding-bottom: 20px;
}

.jumbotron p {
  font-size: 26px;
  font-weight: bold;
  text-align: center;
}

.fuel {
  height: 800px;
  background-color: #FF7F50;
  background-repeat: no-repeat;
  background-size: cover;
  margin-bottom: 0;
}

.fuel h1 {
  text-align: center;
  font-size: 68px;
  padding-top: 200px;
  padding-bottom: 50px;
  color: white;
  text-shadow: .3px .3px 0 #CCC, .6px .6px 0 #CCC, .9px .9px 0 #444, 1.2px 1.2px 0 #444, 1.5px 1.5px 0 #444, 1.8px 1.8px 0 #444;
}

.fuel p {
  text-align: center;
  font-size: 36px;
  padding-left: 200px;
  padding-right: 200px;
  color: white;
}

.learn-more {
  height: 800px;
  margin-bottom: 0;

}

.learn-more h2 {
  text-align: center;
  color: black;
  font-size: 60px;
  padding-top: 225px;

}

.learn-more p {
  text-align: center;
  color: black;
  font-size: 32px;
  padding-left: 50px;
  padding-right: 50px;
}

.nav2 {
  height: 150px;
  background-image: url("/Users/Pat/Downloads/footer_lodyas/footer_lodyas.png");
}

.nav2 h1 {
  font-size: 18px;
  padding-bottom: 0px;
  font-weight: bold;
  color: white;
}

.nav2 p {
  color: white;
}

.nav2 ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav2 a {
  color: white;
  font-size: 14px;

}

.nav2 li a {
  display: block;
  padding: 5px 0px;
  color: white;
}

.nav2 h2 {
  font-size: 18px;
  font-weight: bold;
  color: white;
}

Thanks for all of the help. 感谢您的所有帮助。

/Users/Pat/Downloads/bootstrap-3.3.2-dist/css/ is a path in your Mac computer and not in your Windows computer. /Users/Pat/Downloads/bootstrap-3.3.2-dist/css/是Mac计算机而非Windows计算机中的路径。

So you can choose to just have the file in the same folder (and use the file's name instead, as you did for Website_Layout.css ) or use a Bootstrap CDN . 因此,您可以选择将文件放在同一文件夹中(并使用文件名,就像对Website_Layout.css ),或使用Bootstrap CDN

I like using relative paths in development so that I can move the files without any problems.For example, I create css,js and images folders inside the project directory.From there the path to say css files will be css/css_file.css. 我喜欢在开发中使用相对路径,以便我可以移动文件而没有任何问题,例如,我在项目目录中创建了css,js和images文件夹,从那里可以说css文件的路径是css / css_file.css。 Also,as mentioned by others you can use a cdn like http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css . 另外,正如其他人所述,您可以使用CDN,例如http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM