Skip to content

Instantly share code, notes, and snippets.

@Troland
Created June 28, 2018 16:01
Show Gist options
  • Save Troland/298aca67dced109d8358a31559494d20 to your computer and use it in GitHub Desktop.
Save Troland/298aca67dced109d8358a31559494d20 to your computer and use it in GitHub Desktop.
/*vertical center*/
.flex-vertical-center {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
flex-direction: column;
/* 垂直居中 */
-webkit-box-pack: center;
-moz-box-pack: center;
-ms-flex-align: center;
/* IE 10 */
-webkit-justify-content: center;
-moz-justify-content: center;
justify-content: center;
/* IE 11+,Firefox 22+,Chrome 29+,Opera 12.1*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment