Javascript:总是显示Chrome地址栏
Javascript: always show Chrome address bar
如何使用Javascript在移动设备上启用"always show"地址栏?
换句话说,当用户向下滚动时不要隐藏。
可以创建一个div
,设置高度为100%
,使用overflow-y:auto;
如果你复制这段代码并粘贴到你的项目中,你会看到这就是你要找的。
请谨慎使用,我个人喜欢chrome隐藏导航栏。
的例子:
/* You NEED to set the container height */
html, body {
height:100%;
}
/* Then override the scrollbar by a custom scrollable element: */
.customnavigation {
height:100%;
overflow-y:auto;
}
<div class="customnavigation">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
<img src="http://placehold.it/150x150">
</div>
相关文章:
- 后焦点更改为IE 11中的地址栏,而不是转移到表单中的下一个控件
- 地址栏中url的缩短
- XSS通过地址栏注入
- 当地址栏出现时,安卓系统上的css固定页脚被隐藏
- 当移动地址栏出现/消失时,防止更改窗口高度
- 是否可以更改更改特定事件在地址栏或浏览器中的URL
- 自动隐藏地址栏问题
- 当用户向下滚动我的网页时,如何删除chrome地址栏周围的边框
- 防止 Chrome 浏览器地址栏自动隐藏在 iOS 设备中
- Javascript/Chrome:是否可以访问's是在地址栏中键入的
- 安卓平板电脑-Chrome浏览器/本地浏览器:地址栏和固定高度(100%)问题
- Chrome新标签页扩展窃取焦点从地址栏
- 如何隐藏地址栏在最新版本(Firefox, chrome和internet explorer)使用javascript窗
- 如何在android chrome浏览器中隐藏地址栏
- 检测Chrome for iOS地址栏何时显示
- 为什么当我在地址栏中键入新的搜索结果,然后Chrome导航到谷歌页面结果时,它会更改tabId
- Chrome扩展,Javascript:从地址栏获取URL
- Javascript:总是显示Chrome地址栏
- Firefox和Chrome的弹出窗口地址栏不一致
- Chrome扩展:可以检测拖拽在地址栏