gpt4 book ai didi

jquery - 删除 jquery-mobile 中的垂直滚动条

转载 作者:可可西里 更新时间:2023-11-01 13:51:22 26 4
gpt4 key购买 nike

我是 jquery-mobile 的新手。加载div“display:none;”时,页面正常。但是加载div“display:block;”后,出现了一个垂直滚动条。

我尝试将 css 高度更改为 80%,正在工作。但我想要的是 100%。

如何删除垂直滚动条。谢谢

下面是我的jsfiddle:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
#uploadloading {
position: absolute;
z-index: 1;
background: url(http://www.arabianbusiness.com/skins/ab.main/gfx/loading_spinner.gif) 50% 50% no-repeat rgba(255, 255, 255, 0.8);
width: 100%;
height: 100%;
}
<div data-role="page" id="samplepg">
<div data-role="header" data-position="fixed" data-theme="a" role="banner" class="ui-header ui-bar-a ui-header-fixed slidedown ui-fixed-hidden"><h1 class="strokeme ui-title" role="heading" aria-level="1">Header</h1>
</div>

<div data-role="main" class="ui-content" id="samplemain"><div id="uploadloading" style="display:block;"></div>
<div id="samplebody">
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
</div>
<div data-role="footer" data-id="foo1" style="text-align:center;" data-position="fixed" data-tap-toggle="false"><div class="bfooter"><div style="height:56px;">Footer</div>
</div>
</div>
</div>

最佳答案

只要给

 #uploadloading {
top: 0;
}

#uploadloading {
position: absolute;
z-index: 1;
background: url(http://www.arabianbusiness.com/skins/ab.main/gfx/loading_spinner.gif) 50% 50% no-repeat rgba(255, 255, 255, 0.8);
width: 100%;
height: 100%;
top: 0;
}
<div data-role="page" id="samplepg">
<div data-role="header" data-position="fixed" data-theme="a" role="banner" class="ui-header ui-bar-a ui-header-fixed slidedown ui-fixed-hidden">
<h1 class="strokeme ui-title" role="heading" aria-level="1">Header</h1>
</div>

<div data-role="main" class="ui-content" id="samplemain">
<div id="uploadloading" style="display:block;"></div>
<div id="samplebody">
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
<li>sdf</li>
</div>
<div data-role="footer" data-id="foo1" style="text-align:center;" data-position="fixed" data-tap-toggle="false">
<div class="bfooter">
<div style="height:56px;">Footer</div>
</div>
</div>
</div>

关于jquery - 删除 jquery-mobile 中的垂直滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33996024/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com