要让内容从页面的上方开始显示,可以将容器的align-items属性设置为flex-start。修改代码如下:

.container { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 200vh; }

container display flex; flex-direction column; align-items center; justify-content center; height 200vh; 怎么设置内容从页面的上方开始显示

原文地址: http://www.cveoy.top/t/topic/hWLM 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录