Skip to content

Instantly share code, notes, and snippets.

@cheng470
Last active August 29, 2015 14:07
Show Gist options
  • Save cheng470/f4cf61c8510fb95f6ed9 to your computer and use it in GitHub Desktop.
Save cheng470/f4cf61c8510fb95f6ed9 to your computer and use it in GitHub Desktop.
页面居中
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
body {
text-align: center;
}
.wrapper {
width: 920px;
margin: 0 auto;
text-align: left;
border: 1px solid;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="header">
<h1>Header</h1>
</div>
<div class="content">
<p>content</p>
</div>
<div class="footer">
<p>footer</p>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment