我创建了一个网站,在“WebMatrix”中使用它时看起来很棒。当我尝试发布它时(在通过“Bahnhof”托管的服务器上,仅使用HTML),没有看到Bootstrap效果。使用Bootsrap创建的网站无法正确显示
可能是什么问题?我曾经通过同一台服务器上传了一个网站,然后才依赖于CSS,但之后它运行正常。我已经使用朋友的服务器测试过这个网站,然后运行。 “Bahnhof”说他们的服务器是基于Linux的,并且它只支持HTML和浏览器提供支持的其他东西。
Ex。在index.html的代码(我知道这是一个有点长,但我知道网站的编码,大部分CSS的是东西我已经通过教程发现#1):
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home</title>
<link rel="stylesheet" href="bootstrap.css">
<link href="/css/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
.navbar-inner {
background: #FFF; /* Old browsers */
background: -moz-linear-gradient(top, rgba(69,72,77,1) 0%, rgba(0,0,0,1)
100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba
(69,72,77,1)), color-stop(100%,rgba(0,0,0,1)));
background: -webkit-linear-gradient(top, rgba(69,72,77,1) 0%,rgba(0,0,0,1)
100%);
background: -o-linear-gradient(top, rgba(69,72,77,1) 0%,rgba(0,0,0,1) 100%);/
background: -ms-linear-gradient(top, rgba(69,72,77,1) 0%,rgba(0,0,0,1) 100%);
background: linear-gradient(to bottom, rgba(69,72,77,1) 0%,rgba(0,0,0,1)
100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#45484d',
endColorstr='#000000',GradientType=0);
border: 0px solid black;
}
.navbar .nav > li > a {
color: #000;
background: #ffffff !important;
padding: 80px;
font-weight:bolder;
font-family: 'Simplified Arabic Fixed';
}
.navbar .nav > li > a:hover{
color:#000 !important;
background: #ffffff !important;
font-family: 'Simplified Arabic Fixed';
font-weight:bolder;
-webkit-transition:background 1s ease;
-moz-transition:background 1s ease;
-o-transition:background 1s ease;
transition:background 1s ease;
}
.navbar .nav .active > a,
.navbar .nav .active > a:hover,
.navbar .nav .active > a:focus {
color: #000;
background: #ffffff !important;
font-weight:bolder !important;;
font-family: 'Simplified Arabic Fixed';
font-size: 18px;
box-shadow:none;
background: #ffffff !important;
outline: none;
-moz-outline-style: none;
-webkit-outline: none;
-o-outline: none;
-ms-outline: none;
}
.nav-collapse a {
background: #ffffff !important;
font-weight:bolder !important;
font-family: 'Simplified Arabic Fixed';
font-size: 18px;
text-shadow:none !important;
outline: none;
-moz-outline-style: none;
-webkit-outline: none;
-o-outline: none;
-ms-outline: none;
}
.navbar .nav > li > a:visited {
color: #000;
background: #ffffff !important;
font-weight:bolder !important;
font-family: 'Simplified Arabic Fixed';
font-size: 18px;
outline: none;
-moz-outline-style: none;
-webkit-outline: none;
-o-outline: none;
-ms-outline: none;
}
.hero-unit {
padding:20% 30% 20% 30%;
margin-bottom: 0px;
font-size: 18px;
font-weight: 200;
font-family: 'Simplified Arabic Fixed';
line-height: 30px;
color: inherit;
background-color: #FFF;
border:0px solid #cacaca;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
.nav {
padding-right: 10%;
padding-left: 10%;
}
.body {
padding-bottom: 20%;
}
</style>
<script src="jquery-1.9.0.js"></script>
<script src="bootstrap.js"></script>
<script type="text/javascript"> </script>
<script src="/js/jquery.js"></script>
<script src="/js/bootstrap.min.js"></script>
</head>
<body style="background-color: #FFF">
<div class="navbar navbar-fixed-bottom center">
<div class="navbar-inner-inverse">
<div class="container-fluid">
<ul class="nav">
<li class="active"><a href="#">HOME</a></li>
<li><a href="about.html">ABOUT</a></li>
<li><a href="report.html"">REPORTS</a></li>
<li><a href="contact.html">CONTACT</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="hero-unit">
<div class="row-fluid">
<div class="span12">
<h2>Home</h2>
<p> </p>
</div>
</div>
</div>
</body>
</html>
它没有帮助。我用Opera的蜻蜓检查错误,它们都似乎绑在Bootstrap上。 )。看起来像一个绝望的情况? – Nanaki