<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
body{
margin: 0px auto;
}
.app {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100vw;
height: 100vh;
font-size: 8rem;
background: hsl(240, 100%, 67%);
color: hsl(0, 0%, 100%);
}
</style>
</head>
<body>
<div class="app">
<h3>Hey</h3>
</div>
</body>
</html>
支持将任意的元素标签<p>、<h2>、<img>居中显示
flex-direction: column;
justify-content: center;
align-items: center;
//这三个样式标签自己体验下就知道有什么作用