{"action":"opened","issue":{"url":"https://api.github.com/repos/xwartz/xwartz.github.com/issues/19","labels_url":"https://api.github.com/repos/xwartz/xwartz.github.com/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/xwartz/xwartz.github.com/issues/19/comments","events_url":"https://api.github.com/repos/xwartz/xwartz.github.com/issues/19/events","html_url":"https://github.com/xwartz/xwartz.github.com/issues/19","id":103500209,"number":19,"title":"存在滚动时，内部元素超出滚动区域","user":{"login":"xwartz","id":4149827,"avatar_url":"https://avatars.githubusercontent.com/u/4149827?v=3","gravatar_id":"","url":"https://api.github.com/users/xwartz","html_url":"https://github.com/xwartz","followers_url":"https://api.github.com/users/xwartz/followers","following_url":"https://api.github.com/users/xwartz/following{/other_user}","gists_url":"https://api.github.com/users/xwartz/gists{/gist_id}","starred_url":"https://api.github.com/users/xwartz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xwartz/subscriptions","organizations_url":"https://api.github.com/users/xwartz/orgs","repos_url":"https://api.github.com/users/xwartz/repos","events_url":"https://api.github.com/users/xwartz/events{/privacy}","received_events_url":"https://api.github.com/users/xwartz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xwartz/xwartz.github.com/labels/%E4%B9%9F%E8%AE%B8%E6%88%91%E5%8F%AF%E4%BB%A5%E6%89%BE%E4%B8%AA%E6%97%B6%E9%97%B4%E7%A0%94%E7%A9%B6%E4%B8%8B","name":"也许我可以找个时间研究下","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-27T12:48:18Z","updated_at":"2015-08-27T12:48:18Z","closed_at":null,"body":"当父元素或者父元素的上层...设置了 `overflow: auto` 或者 `overflow:scroll`，然后内部元素设置 `position: absolute;` 内部元素是可以超出滚动区域的。\r\n\r\n但是当父元素设置了 'position: relative;'，内部元素就无法超出滚动区域，父元素 `position: absolute;` 是可以超出的。\r\n\r\n将父元素的父元素设置 'position: relative;'，也是不能超出滚动区域，直到在设置 `overflow: auto`  元素的父元素，才可以超出。\r\n这里本来还觉得很诡异，因为之前代码里层级很多，然后发现只有在父元素三至四层时 设置 'position: relative;' 内部元素可以超出滚动区。其实这里的三至四层父元素，已经在滚动区域外部了，也就是内部元素 `position: absolute;` 参照的定位元素已经在滚动区域外部，所以才能超出滚动区域。\r\n\r\n\r\n"}}