I 等宽条纹

image.png

  1. .box{
  2. width: 230px;
  3. height: 160px;
  4. background: linear-gradient(#fb3 50%,#58a 50%);
  5. background-size: 100% 50px;
  6. }

II 不等宽条纹

  1. background: linear-gradient(#fb3 30%, #58a 0);
  2. background-size: 100% 30px;

III 多种颜色条纹

image.png

  1. .box{
  2. width: 230px;
  3. height: 160px;
  4. background: linear-gradient(#fb3 33%,
  5. #58a 0, pink 66%, yellowgreen 0);
  6. background-size: 100% 50px;
  7. }