Skip to content

Instantly share code, notes, and snippets.

@Troland
Created June 28, 2018 16:01
Show Gist options
  • Save Troland/1849f9fae8c14f9d03ceb4fc7e16957c to your computer and use it in GitHub Desktop.
Save Troland/1849f9fae8c14f9d03ceb4fc7e16957c to your computer and use it in GitHub Desktop.
/*horizontally center*/
.flex-horizonal-center {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
/* 水平居中*/
-webkit-box-align: center;
-moz-box-align: center;
-ms-flex-pack: 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