【发布时间】:2021-01-11 15:01:07
【问题描述】:
我有一个空页面,我想在重定向之前显示一个加载器。
<template>
<span class="flex flex-col items-center justify-center h-screen ">
<atom-spinner
:animation-duration="1000"
:size="160"
:color="'#1f6492'"
/>
</span>
</template>
<script>
import {AtomSpinner} from 'epic-spinners'
export default {
props: [
'card',
],
components: {
AtomSpinner
},
mounted() {
},
}
</script>
如果我这样做,h-screen 类将采用屏幕大小,而不采用标题大小和边距。所以,最后,它不会垂直居中。
如果我有办法用 填充我的屏幕,我可以轻松做到
我应该如何让加载器在屏幕中心居中?
【问题讨论】:
-
你能分叉其中一个吗? codesandbox.io/examples/package/tailwindcss 并分享链接。
-
我分叉了它,但它是 React 而不是 Vue,我不知道如何使它工作:(
标签: css tailwind-css