Skip to content

Instantly share code, notes, and snippets.

@oakhole
Created July 11, 2015 15:29
Show Gist options
  • Save oakhole/2ca5bce6790892b13fde to your computer and use it in GitHub Desktop.
Save oakhole/2ca5bce6790892b13fde to your computer and use it in GitHub Desktop.
CSS垂直居中显示
div{
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment