Bootstrap适用于本地主机,但不适用于服务器

时间:2015-04-24 13:23:13

标签: twitter-bootstrap localhost server

<!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">
        <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
        <title>test</title>

        <!-- Bootstrap/css -->
        <link href="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]-->
        <link href="css/minestyle.less" rel="stylesheet">
        <!-- CUSTOM -->
        <link href='http://fonts.googleapis.com/css?family=Orbitron' rel='stylesheet' type='text/css'>
        <link href='http://fonts.googleapis.com/css?family=Poiret+One' rel='stylesheet' type='text/css'>
        <!-- Hover effect -->
        <link rel="stylesheet" type="text/css" href="css/style10.css" />
        <link rel="stylesheet" type="text/css" href="css/style_common.css" />

        <link href="css/font-awesome.min.css" rel="stylesheet">
        <!-- J.Q. *********** -->
        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>

    </head>

我不知道为什么但bootstrap在localhost上工作完美(只有IE在localhost上产生相同的结果),当我在服务器上传它时,它似乎忽略了bootstrap ......

我尝试将css / bootstrap.min.css重写为../css/bootstrap.min.css,但它也不起作用......

有谁知道问题出在哪里?

1 个答案:

答案 0 :(得分:0)

检查您的路径和文件夹。 Maybie尝试(找出它是否存在路径问题)将所有文件放到单个文件夹中。

此外,您可能希望使用专用于Bootstrap的托管 - http://www.bootstrap.hosting/