简体   繁体   English

您如何补偿浏览器中的滚动条?

[英]How Do You Compensate For Scroll Bar In Browser?

当滚动条出现并将包装纸从中心移开时,是否可以动态补偿?

What I tend to do with layouts that are very sensitive to the scroll bar disappearing (like centered elements) is enforce a scroll bar on every page: 我倾向于对滚动条消失非常敏感的布局(例如居中的元素)要做的是在每个页面上强制使用滚动条:

body { overflow-y: scroll }

this is the one thing that I think Internet Explorer handles better by default: It always reserves space for the scoll bar, allowing for a much smoother experience when switching between pages on the same site. 这是我认为默认情况下Internet Explorer可以更好地处理的一件事:它始终为scoll栏保留空间,当在同一站点上的页面之间切换时,可以提供更加流畅的体验。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在滚动时补偿 android 移动浏览器的隐藏地址栏? 如何在所有浏览器中正确测量“vh”? - How to compensate for hidden address bar of android mobile browsers on scroll? How to correctly measure 'vh' in all browsers? 如何标记浏览器滚动条? - How to mark browser scroll bar? 如何阻止固定的100%宽度元素重叠浏览器的滚动条? - How do I stop a fixed, 100% width element from overlapping the browser's scroll-bar? 如何使用浏览器的滚动条滚动iframe的内容? - How to scroll the content of an iframe using the browser's scroll bar? 如何创建仅在内容而不是标题上滚动的滚动条菜单 - how do you create a scroll bar menu that scrolls only on the content and not on the header 我们如何找到滚动条的宽度? - How do we find the width of scroll bar? 如何在 div 上应用滚动条? - How do I apply scroll bar on div? 如何通过JavaScript或CSS更改滚动条样式或在浏览器中隐藏滚动条? - How to change scroll bar style or hide scroll bar in browser through javascript or css? 在AngularJS中更改路线时如何保持浏览器滚动条在顶部? - How to keep browser scroll bar at the top while changing routes in AngularJS? 如何使用ASP / Javascript在pdf文件上移动浏览器的滚动条? - How to move the scroll bar of the browser on a pdf file with ASP / Javascript?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM