为什么视图不向下滚动?

时间:2014-10-15 20:45:18

标签: jquery html css steroids

大家好! 我正在使用框架类固醇和css / html / js为ios编写移动应用程序。不幸的是,我无法理解,为什么我无法向下滚动视图。请帮忙。

屏幕的html代码

<html>
<head>
  <meta charset="utf8">
  <meta name="viewport" content="width=device-width">
  <title>Teachers</title>

  <link rel="stylesheet" href="/vendor/ionic/css/ionic.css" />
  <link rel="stylesheet" href="vendor/stylesheets/application.css" />

  <script src="/javascripts/onerror.js"></script>
  <script src="/javascripts/console.log.js"></script>

  <!-- cordova.js is served from localhost to ensure the correct version -->
  <script src="http://localhost/cordova.js"></script>
  <script src="/components/steroids-js/steroids.js"></script>

  <script src="/javascripts/application.js"></script>
</head>
<body>


  <div class="grid">

     <img src="teachers/bobr.jpg">
     <h3>Боброва Даша</h3>
     <p>Математический анализ</p>
</div>
<div class="grid">
    <img src="teachers/korolev.jpg">
        <h3>Королев Даня</h3>
        <p>Программирование 1</p>
    </div>
        <div class="grid">
        <img src="teachers/mayb.jpg">
    <h3 >Майборода Кирилл</h3>
     <p>Программирование 2</p>
    </div>

    <div class="grid">
    <img src="teachers/mosh.jpg">
    <h3 >Монгольский фанк</h3>
    <p>Ла-ла</p>
   </div>
</body>
</html>

和css的一部分

body {
    /* Background color set as workaround for Legacy Android issue:
    https://github.com/AppGyver/steroids/issues/381 */
    background-color:#fff;

}



.grid{
width: 100%;
height: 33%;
clear: both;
display: inline-block;
}


.grid img{

    padding-top: 2%;
    padding-bottom: 2%;
    margin-left: 3%;
    width: 33%;
    height:96%;
    float: left;


}
.grid h3{
    font-size: 300%;
    text-align: center;
    padding-top: 4%;


}
.grid p{

    font-size: 200%;
    text-align: center;
}

1 个答案:

答案 0 :(得分:0)

应该声明,因为正文的这个样式是在默认的css文件中声明的,并且是在android / iphome上模拟app的必要条件。