css - Making an S shape with flexbox - Stack Overflow

PHOTO EMBED

Wed Oct 27 2021 14:02:47 GMT+0000 (Coordinated Universal Time)

Saved by @digitalverve #css

* {
  font-size: 0;
  margin: 0;
  padding: 0;
}
section {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
}
span {
  background: black;
  color: white;
  font-size: 11px;
  height: 100px;
  width: 100px;
}
span:nth-child(-n+5) {
  order: 1;
}
span:nth-child(4),
span:nth-child(5) {
  margin-left: 200px;
}
span:nth-child(6) {
  order: 4;
}
span:nth-child(7) {
  order: 3;
}
span:nth-child(8) {
  order: 2;
}
span:nth-child(n+9) {
  order: 5;
}
span:nth-child(9),
span:nth-child(10) {
  margin-right: 200px;
}
content_copyCOPY

https://stackoverflow.com/questions/39574070/making-an-s-shape-with-flexbox