Why Does The overflow-y Property Not Work With Percent Height
问题 I'm trying to use percentage height with overflow-y:auto; and instead of creating a scroll bar on the side of the div, it's using the page scroll bar. Here's an example of want I'm getting at: http://jsfiddle.net/hmwe2jty/ Is it possible to use this property with percent height? 回答1: TL;DR Use the viewport height/width instead of a percentage. Change 100% to 100vh, and you're done! EDIT: The percentages take the precentage of the parent element. For example: console.log("Parent's width: " +