<style>
html,body{
height: 100%;
}
body{
display: flex;
align-items: center;
align-content: center;
}
div {
margin:0 auto;
}
</style>
用CSS使div在整个页面中(水平、垂直)都居中——万能的
最新推荐文章于 2022-07-17 18:05:48 发布