{"action":"opened","issue":{"url":"https://api.github.com/repos/keshidong/NOTE/issues/9","repository_url":"https://api.github.com/repos/keshidong/NOTE","labels_url":"https://api.github.com/repos/keshidong/NOTE/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/keshidong/NOTE/issues/9/comments","events_url":"https://api.github.com/repos/keshidong/NOTE/issues/9/events","html_url":"https://github.com/keshidong/NOTE/issues/9","id":182233481,"number":9,"title":"在position: absolute情况下，margin:auto无效","user":{"login":"keshidong","id":13727212,"avatar_url":"https://avatars.githubusercontent.com/u/13727212?v=3","gravatar_id":"","url":"https://api.github.com/users/keshidong","html_url":"https://github.com/keshidong","followers_url":"https://api.github.com/users/keshidong/followers","following_url":"https://api.github.com/users/keshidong/following{/other_user}","gists_url":"https://api.github.com/users/keshidong/gists{/gist_id}","starred_url":"https://api.github.com/users/keshidong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keshidong/subscriptions","organizations_url":"https://api.github.com/users/keshidong/orgs","repos_url":"https://api.github.com/users/keshidong/repos","events_url":"https://api.github.com/users/keshidong/events{/privacy}","received_events_url":"https://api.github.com/users/keshidong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T10:52:52Z","updated_at":"2016-10-11T10:52:52Z","closed_at":null,"body":"An element with position absolute cannot be centered as the margins cannot be calculated and be centered within.\r\n\r\nPosition relative works because the element has a position relative to its parent which can be used to calculate the margins.\r\n\r\nThis article gives a good overview of assigning margins to absolutely positioned elements: http://web.archive.org/web/20130117135705/http://www.vision.to/articles/margins-and-absolute-positioning.php\r\n\r\nThis forum provides a good description of why it does not work: http://www.justskins.com/forums/css-margins-and-absolute-82168.html\r\n\r\nfrom http://stackoverflow.com/questions/9998260/css-absolute-position-wont-work-with-margin-leftauto-margin-right-auto"}}
{"actor":{"display_login":"keshidong"}}