IScroll wrapper doesn't get a height

2019-02-28 01:20发布

问题:

I have the following code:

<div data-role="content" height="100%" data-iscroll>
    <div class="homebutton_zeile">
        <a id="picture_home" href="#pictures">
            <div class="homebutton_all">
                <div class="homebutton_name">Picture</div>
                    <div class="homebutton_picture">
                        <img src="images/picture.png" alt="image"
                                        style="position: relative;">
                    </div>
                </div>
            </a>        
        </div>
    </div>
</div>

My Classes of CSS

.homebutton_zeile{
 width: 100%;
 height: 30%;
}

.homebutton_all{
 width: 30%;
 height: 90%;
 float:left;
 margin-left: 2%;
 margin-top:15px;
}

.homebutton_picture{
 position: relative;
 width: 100%;
 height: 85%;
 float: left;
 background-color: #AAC7BD;
 border: 1px solid black;
 border-radius: 15px;
 box-shadow:8px 8px 8px #666;
}

.homebutton_name{
 text-align:center;
 position: relative;
 top:-10px;
 width: 100%;
 height: 15%;
 margin-left: auto;
 text-decoration:none;
 color:black;
}

I am using:

  • iscroll.js
  • jQuery 1.8.2
  • jQuery mobile 1.2.0
  • jQuery mobile iscrollview.

And if its needed to know jstorage.js and fastclick.js

But the div above is not getting a height at the wrapper of iscroll. There is also a login before and this page will be shown automatically after the login after a $.mobile.changePage("#home"); function.

I tried to do it as first page before the function of changePage and it gave me the same effect. If I put a &nbsp; for example after the <div data-role="content" height="100%" data-iscroll>&nbps; The wrapper get a height of 15px for the &nbsp; but not for the images inside.