Есть ли способ устранить вторую полосу прокрутки, которая появляется при открытии панели на моей странице? Эта проблема возникает, когда содержимое панели увеличивает высоту окна просмотра.Две полосы прокрутки в мобильной панели JQuery?
В идеале я мог бы использовать оригинальную полосу прокрутки страницы для навигации по панели без прокрутки содержимого страницы. Очень похоже на REI webiste в режиме реагирования.
Это мой fiddle.
CSS:
.ui-panel .ui-panel-inner {
overflow: auto;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0px;
-webkit-overflow-scrolling: touch;
}
HTML:
<div data-role="page">
<div data-role="panel" id="sidebar" data-position="right" data-display="push">
<a href="#" data-rel="close">Close panel</a>
<p> 1995<br>1996<br>1997<br>1998<br>2000<br>2001<br>2002<br>2003<br>2004<br>2005<br>2006<br>2007<br>2008<br>2009<br>2010<br>2011<br>2012<br>2013<br>2014<br>2015<br>2016<br>2017</p>
</div>
<div><a href="#sidebar">Menu</a>
</div>
<div data-role="content">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</div>
Спасибо, но я все еще вижу две полосы прокрутки, и содержимое страницы все еще прокручивается и в вашем примере. Вы также видите, что, когда область просмотра короче содержимого страницы? – BlueHelmet