福特Flex论坛 >
通过青蛙闯关小游戏,学习flex布局
回复

查看: 回复:1

通过青蛙闯关小游戏,学习flex布局

\"收藏此主题\"

柏芝

 
 
注册:
2008-01-23
  • 0粉丝
  • 0精华
  • 477帖子
第一关:

#pond {
  display: flex;
  justify-content: flex-end;
}
第二关:

#pond
 {
  display: flex;
  justify-content: center;
}
第三关:

#pond 
{
  display: flex;
  justify-content: space-around;
}
第四关

#pond 
{
  display: flex;
  justify-content: space-between;
}
第五关:

#pond {
  display: flex;
  align-items: flex-end;
}
第六关:

#pond {
  display: flex;
  justify-content: center;
  align-items: center;
}
第七关:

#pond {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
}
第八关:

#pond {
  display: flex;
  flex-direction: row-reverse;
}
第九关:

#pond {
  display: flex;
  flex-direction: column;
}
第十关:

#pond {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
第十一关:

#pond {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
第十二关:

#pond {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
}
第十三关:

#pond {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: flex-end;
}
第十四关:

#pond {
  display: flex;
}

.yellow {
  order: 2;
}
第十五关:

#pond {
  display: flex;
}

.red {
  order: -1;
}
第十六关:

#pond {
  display: flex;
  align-items: flex-start;
}

.yellow {
  align-self: flex-end;
}
第十七关:

#pond {
  display: flex;
  align-items: flex-start;
}

.yellow {
  order: 2;
  align-self: flex-end;
}
第十八关:

#pond {
  display: flex;
  flex-wrap: wrap;
}
第十九关:

#pond {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}
第二十关:

#pond {
  display: flex;
  flex-flow: column wrap;
}
第二十一关:

#pond {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}
 第二十二关:

#pond {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-end;
}
 第二十三关:

#pond {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column-reverse;
  align-content: center;
}
 第二十四关:

#pond {
  display: flex;
  flex-flow:column-reverse wrap-reverse;
  justify-content:center;
  align-content:space-between;
}
(在写最后一关想了很久,翻了mdn才明白,注意区分align-content和align-items)
 
回复本楼

太平洋汽车全新推出“太平洋车友会”;来太平洋车友会,结识志同道合的车友了解详情>>

向幸福出发518

 
 
注册:
2015-06-17
车友会签到666天以上
来自太平洋汽车 Android客户端  
哈哈(?ω?)hiahiahia哈哈(?ω?)hiahiahia啥也没有(>﹏<)
 
回复本楼
未登录用户

只可添加一张图片,多张图片请选高级模式

高级模式
温馨提示:回复超10字可获1金币,有独特见解超30字可获3金币,灌水用户将扣除金币并锁号处理。希望广大车友共同维护论坛的友好回复氛围。
常用表情
您可能感兴趣

支付宝扫码询价
领最高888元现金红包

关闭