jquery - 响应式网页在移动设备上太小

标签 jquery html css viewport

我有一个响应式网站。该网站在浏览器中正确加载。然而在手机本身,网站有正确的宽度,但在纵向模式下高度只有屏幕的一半,字体很小。在 Landscape 中,它可以完美加载。

如何让它在纵向模式下填满整个屏幕?我在纵向模式下使用 JQuery 和汉堡菜单,仅用于我的导航列表。我还在 content="device width" 中使用视口(viewport)代码。如果我添加 initial-scale=1,这会以放大模式加载整个网站,在这种模式下我必须水平和垂直滚动。

<head>
    <meta charset="UTF-8" />

    <!-- This add the Angular JS to the program -->  
    <script  src="js/index.js"></script>
    <script  src="js/angular.min.js"></script>
    <script  src="js/angular-route.min.js"></script>
    <script  src="js/angular-cookies.min.js"></script>
    <script  src="js/app.js"></script>

    <!-- This add the JQuery to the program -->  
    <script src="js/jquery-3.3.1.js"></script>
    <script  src="js/menu.js"></script>


    <!-- Responsive Design Viewport code -->
    <meta name="viewport" content="width=device-width">

    <link rel="Stylesheet" href="css/bootstrap.min.css" />
    <link rel="Stylesheet" href="css/styles.css" type="text/css"/>
    <link rel="Stylesheet" href="css/responsive.css" media="screen and (max-width: 900px)"/>


</head>

<!-- Webcontainer  -->
<div id="webcontainer">

    <!-- Headersection outlines the header section of the webcontainer -->

  <div id="headersection">
    <div id="header-topblank-sec">
       <div id="horiznav">
          <a class="burger-menu"></a>
          <!-- Menu Items -->
          <ul> 
            <li>
               <a href="#/home">HOME</a>
               <a href="#/about">ABOUT</a>
               <a href="#/matchup">THE MATCHUP</a>
               <a href="#/vote">VOTE</a>
       <a href="#/contact">CONTACT</a>
            </li>
          </ul>
       </div>           <!-- Loads the blank color section -->


    </div>

    <div id="headerimage">
       <!-- Load the logo -->
   <div id="header-img-sec">
    <img src="img/Clash-Head-Image-alt-size.png">
        </div>
    </div>



<div id="header-botblank-sec"> 
       <!-- Loads the blank color section and subtitle-->
   <div id="clash_subtitle">
       <p><em>&quot;A Marching Band Exhibition&quot</em></p>
       </div>
    </div>


  </div>

    <!-- Websections  -->
    <div id="websections">


       <!-- Defines the Right Section of Websections -->
       <!-- <div id="rightsection"> -->
       <div id="web-body">              

         <div ng-view=""></div>
       </div>

    </div>

</div>
</body>

最佳答案

要完全填充您的页面,您可以设置容器 min-height: 100vh

关于jquery - 响应式网页在移动设备上太小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51793861/

相关文章:

html - 如何让一组 div 填充包含的 div

android - WebView 和 HTML5 <视频>

jQuery ajax 从 webapi 2 加载二进制图像

javascript - 如何在页面加载时打开数据英国模式

javascript - 每次使用 jQuery,scrollTop() 返回零

css - 将 z-index 设置为高于父级

html - 使用 CSS3 固定宽度但可变背景

javascript - Django 1.7 w/AJAX,如何或在哪里清理要在 AJAX 请求中传递的输入

html - 我如何像其他页面一样在该页面上获得页边距?

javascript - 使 jQuery 图像 slider 停在最后一张图像并添加下一个和上一个按钮