可以在第一个view的样式中添加"align-self: center;"属性,使其在flex布局中垂直居中。例如:

.item view:first-child { align-self: center; }

view wxfor=mulWeather wxkey=index class=item viewitemweatherview viewitemtemperatureview viewitemdateview viewitemdirectview view 使用flex布局后怎么指定第一个view的数据居于自己居中

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

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