在我的 phonegap 应用程序中,我想实现水平滚动视图。我的html代码
<div id="songsListPage" data-role="page">
<div id="alphabets" >
<a href="#" >#</a>
<a href="#" >A</a>
<a href="#" >B</a>
<a href="#" >C</a>
<a href="#" >D</a>
<a href="#" >E</a>
<a href="#" >F</a>
<a href="#" >G</a>
<a href="#" >H</a>
<a href="#" >I</a>
<a href="#" >J</a>
<a href="#" >K</a>
<a href="#" >L</a>
<a href="#" >M</a>
</div>
<div id="songs_list" data-role="content"> <!-- this should not scroll, but it is and showing white background on right side -->
<ul id="songsList" data-role="listview" data-theme="a"></ul> <!-- list is populated dynamically -->
<p>This is songs page</p>
<a href="player.html" id="playerBtn" data-role="button" class="ui-btn-active" ></a>
</div>
</div>
我的 CSS
#alphabets {
background:#000000;
display: block;
padding: 5px;
clear: both;
height: 30px;
margin-bottom: 22px;
padding-left: 5px;
padding-right: 5px;
padding-top: 5px;
width: 200%;
overflow-x: auto;
}
#alphabets a{ color: #ffffff; margin-left: 5px}
通过给出“宽度:200%”和“溢出-x:自动”,我得到了水平滚动,但问题是我的屏幕的其余部分也在水平滚动,所以有什么办法可以实现这一点吗?