Last active
December 22, 2015 15:38
-
-
Save leohxj/6493450 to your computer and use it in GitHub Desktop.
垂直居中方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .Center-Container.is-Inline { | |
| text-align: center; | |
| width: 100%; | |
| height: 100%; | |
| position: absolute; | |
| top: 0; | |
| right: 0; | |
| bottom: 0; | |
| left: 0; | |
| font-size: 0; | |
| } | |
| .Center-Container.is-Inline:after { | |
| text-align: center; | |
| content: ''; | |
| display: inline-block; | |
| height: 100%; | |
| vertical-align: middle; | |
| margin-right: -.25em | |
| } | |
| .is-Inline .Center-Block { | |
| display: inline-block; | |
| vertical-align: middle; | |
| width: 90%; | |
| background: #2E5F3E; | |
| } | |
| #more { | |
| font-size: 32px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment