<template>
<div class="header">
<div class="title">XXX系统</div>
</div>
</template>
<style scoped>
.title{
position: relative;
top: 50%;
transform: translateY(-50%);
width: 100%;
}
</style>
Vue设置一个div在另一个div中垂直居中
最新推荐文章于 2024-03-22 09:01:36 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)