Skip to content

Instantly share code, notes, and snippets.

@morrxy
Last active April 11, 2018 03:08
Show Gist options
  • Save morrxy/142bf8eaba46a1efb64e6c38ffd877b7 to your computer and use it in GitHub Desktop.
Save morrxy/142bf8eaba46a1efb64e6c38ffd877b7 to your computer and use it in GitHub Desktop.
[垂直居中] #css
.tip-mask {
z-index: 200;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.4);
.update-tip {
font-size: px2rem(30);
background-color: #fff;
border-radius: px2rem(10);
position: relative;
width: 70%;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%); /* IE 9 */
-moz-transform:translate(-50%,-50%); /* Firefox */
-webkit-transform:translate(-50%,-50%); /* Safari 和 Chrome */
-o-transform:translate(-50%,-50%); /* Opera */
}
.buy-lottery-record {
width: 6.5rem;
height: 7.62rem;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment