Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 引导和/或媒体查询在Github页面上不起作用_Html_Css_Bootstrap 4_Github Pages - Fatal编程技术网

Html 引导和/或媒体查询在Github页面上不起作用

Html 引导和/或媒体查询在Github页面上不起作用,html,css,bootstrap-4,github-pages,Html,Css,Bootstrap 4,Github Pages,我想使用GitHub页面主持一个网站。我可以上传它,它在电脑上运行得很好。然而,当我在手机上打开它时,引导和/或媒体查询不起作用,因为该网站看起来像是在缩小以适应,而不是采用我编写的响应性布局 现在我的文件看起来像: index.html <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- CSS --> <link rel="styl

我想使用GitHub页面主持一个网站。我可以上传它,它在电脑上运行得很好。然而,当我在手机上打开它时,引导和/或媒体查询不起作用,因为该网站看起来像是在缩小以适应,而不是采用我编写的响应性布局

现在我的文件看起来像:

index.html

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/responsive.css">
<!-- JS (end of body) -->
<script src="js/custom.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.bxslider.js"></script>
<!-- Meta tag for responsive websites -->
<meta name="viewport" content="width-device-width, initial scale=1, shrink-to-fit=no">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/style.css">
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/responsive.css">
<!-- JS-->
<script src="https://EmiliaPaz.github.io/js/custom.js"></script>
<script src="https://EmiliaPaz.github.io/js/jquery.js"></script>
<script src="https://EmiliaPaz.github.io/js/bootstrap.min.js"></script>
<script src="https://EmiliaPaz.github.io/js/jquery.bxslider.js"></script>
问题是,在我的手机上,网站看起来像这样:

当它看起来像这样时(根据响应者):

我跟着 并试图通过在github上添加文件位置来修复它。然而,我得到了同样的结果

index.html

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/responsive.css">
<!-- JS (end of body) -->
<script src="js/custom.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.bxslider.js"></script>
<!-- Meta tag for responsive websites -->
<meta name="viewport" content="width-device-width, initial scale=1, shrink-to-fit=no">
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/style.css">
<link rel="stylesheet" type="text/css" href="https://EmiliaPaz.github.io/css/responsive.css">
<!-- JS-->
<script src="https://EmiliaPaz.github.io/js/custom.js"></script>
<script src="https://EmiliaPaz.github.io/js/jquery.js"></script>
<script src="https://EmiliaPaz.github.io/js/bootstrap.min.js"></script>
<script src="https://EmiliaPaz.github.io/js/jquery.bxslider.js"></script>

我发现真正奇怪的是,当我把我的网站URL()放在responsiator.com上时,它表明它应该在更小的屏幕上工作,但它不能


感谢您的帮助,我真的被困在了safari IOS上,Meta viewport需要适应设备的宽度

<meta name="viewport" content="width=device-width, initial-scale=1.0">

有关更多信息,请参考下面的堆栈问题:
您的
标签有一个打字错误(
宽度设备宽度

更改为:

<meta name="viewport" content="width-device-width, initial scale=1, shrink-to-fit=no">