【问题标题】:Not working in some browser like chrome无法在某些浏览器(例如 chrome)中运行
【发布时间】:2018-02-22 01:44:51
【问题描述】:

手机视图不显示菜单和智能手机的chrome。这是测试环境的链接。link 这是我的 header.php

   <!DOCTYPE HTML>
<html>
<head>
        <title>WandaSoko</title>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="shortcut icon" href="assets/favicon/favicon.ico" type="image/x-icon"/>

        <!--systling start here -->
                        <!--bootstrap -->
        <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" media="all">
        <!--link href="assets/css/bootstrap.css" rel="stylesheet" type="text/css" media="all"-->
                        <!--custom-->
        <link href="assets/css/wandasoko.css" rel="stylesheet" type="text/css" media="all" /> 
                        <!-- Custom Fonts -->
        <link href="assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
                        <!--out sourced custom font-->
                        <!--other css_-->
        <link rel="stylesheet" href="assets/css/swipebox.css">
                        <!--slider flow controller-->
        <link href="assets/css/slider_flow.css" rel="stylesheet" type="text/css" media="all" />

        <!--link href='http://fonts.googleapis.com/css?family=Roboto+Slab:400,700,300,100' rel='stylesheet' type='text/css'-->
        <!--link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'-->
    </head>
<body>

【问题讨论】:

  • @ – 如果您没有答案,Paulie_D 不要回答问题。您的评论没有帮助
  • 我没有回答这个问题。我只是指出了我们在您问题中的不足之处。
  • 那你就无法理解 Stack Overflow 是如何工作的。用户在这里判断您的问题。

标签: css google-chrome viewport


【解决方案1】:

你需要使用@media queries

我刚刚查看了您的页面源代码。你甚至没有导航栏的 js。看起来好像您只使用 css 来调整导航栏的大小。

所以我建议您考虑实现一个响应式引导导航栏。然后你使用媒体查询来改变视口变化,然后你需要在你的&lt;head&gt; - &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt; 中添加这一行,但这只有在你获得导航栏的 css 和 js 后才有效。

我不会为你做,但谷歌搜索引导导航栏是一个开始?

【讨论】:

  • 我的js在一个单独的文件里。上面的代码只针对header.php。 js 在一个名为 footer.php 的文件中
【解决方案2】:
'<meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="shortcut icon" href="assets/favicon/favicon.ico" type="image/x-icon"/>

'

【讨论】:

    猜你喜欢
    • 2015-08-13
    • 1970-01-01
    • 2016-09-12
    • 1970-01-01
    • 1970-01-01
    • 2018-12-29
    • 2013-06-02
    • 2012-05-08
    • 2021-06-06
    相关资源
    最近更新 更多