[F] Fix vertical center on mobile devices

This commit is contained in:
Hykilpikonna
2019-08-21 22:55:09 +08:00
parent d33e189934
commit fac4c86b2d
2 changed files with 18 additions and 9 deletions
+10 -3
View File
@@ -28,6 +28,16 @@
// Disable horizontal scroll // Disable horizontal scroll
overflow-x: hidden; overflow-x: hidden;
// Make it a table for vertical centering
display: table;
}
.login-vertical-center
{
// Vertically center
display: table-cell;
vertical-align: middle;
} }
// The user interacting panel // The user interacting panel
@@ -46,9 +56,6 @@
box-shadow: 0 0 20px 0 white; box-shadow: 0 0 20px 0 white;
border: 1px solid #DCDFE6; border: 1px solid #DCDFE6;
// Vertical center
transform: translateY(50%);
// Make it white // Make it white
background-color: white; background-color: white;
+2
View File
@@ -1,5 +1,6 @@
<template> <template>
<div id="login" class="login-overlay"> <div id="login" class="login-overlay">
<div class="login-vertical-center">
<div class="login-panel"> <div class="login-panel">
<img alt="Vue logo" src="../../assets/logo.png"> <img alt="Vue logo" src="../../assets/logo.png">
<h1>Veracross Analyzer</h1> <h1>Veracross Analyzer</h1>
@@ -8,6 +9,7 @@
<el-button plain type="primary" @click="onLoginClick" :loading="loading">Login</el-button> <el-button plain type="primary" @click="onLoginClick" :loading="loading">Login</el-button>
</div> </div>
</div> </div>
</div>
</template> </template>
<script src="./login.ts" lang="ts"></script> <script src="./login.ts" lang="ts"></script>