关于css 高度设置为百分比形式无效

原因:子设置高度%是按照父高度进行计算
所以要先设置父高度

uni:

.hei{  //因为没有html body等标签template设置高度也无效
		height: 100%;
		position:fixed;
		width: 100%;
	}//可在最外层盒子使用

在这里插入图片描述

发布了48 篇原创文章 · 获赞 1 · 访问量 3817

猜你喜欢

转载自blog.csdn.net/qq_43840143/article/details/103613177