关于微信开发者工具的flex布局一直提示编译错误,想知道是那边的问题!


/* pages/list/list.wxss */
.container {}
 
.s1 {

 .s1 {
  width: 100px;
  height: 100px;
  background-color: aquamarine;
 }
 .s2 {
  width: 100px;
  height: 100px;
  background-color: rebeccapurple;
 }
 .s3 {
  width: 100px;
  height: 100px;
  background-color: greenyellow;
 }
 .s4 {
  width: 100px;
  height: 100px;
  background-color: red;
 }


}

img

微信小程序的 flex 布局一般不会提示编译错误,但可能是因为格式问题造成的,请检查一下代码格式是否正确,例如是否存在多余的空格等,同时检查是否有未定义的变量等。

看编辑器 wxss里有报错 ,可能是 格式问题,少括号,中英文 符号 问题 你仔细看看