Skip to content

Instantly share code, notes, and snippets.

@yinxianwei
Last active February 11, 2018 06:51
Show Gist options
  • Save yinxianwei/7dc2a2c501561dbf9f25992f92dec7f8 to your computer and use it in GitHub Desktop.
Save yinxianwei/7dc2a2c501561dbf9f25992f92dec7f8 to your computer and use it in GitHub Desktop.
小程序 flex
.row {
display: flex;
flex-direction: row;
word-break: break-all;
}
.col {
display: flex;
flex-direction: column;
}
.flex_wrap {
flex-wrap: wrap;
}
.space_between__start {
justify-content: space-between;
align-items: flex-start;
}
.space_between__center {
justify-content: space-between;
align-items: center;
}
.space_between__end {
justify-content: space-between;
align-items: flex-end;
}
.space_between__stretch {
justify-content: space-between;
align-items: stretch;
}
.space_around__center {
justify-content: space-around;
align-items: center;
}
.space_around__stretch {
justify-content: space-around;
align-items: stretch;
}
.center__center {
justify-content: center;
align-items: center;
}
.center__start {
justify-content: center;
align-items: flex-start;
}
.center__end {
justify-content: center;
align-items: flex-end;
}
.end__center {
justify-content: flex-end;
align-items: center;
}
.start__center {
justify-content: flex-start;
align-items: center;
}
.start__start {
justify-content: flex-start;
align-items: flex-start;
}
.start__end {
justify-content: flex-start;
align-items: flex-end;
}
.center__space_around {
justify-content: center;
align-items: space-around;
}
.space_around__start {
justify-content: space-around;
align-items: flex-start;
}
.end__start {
justify-content: flex-end;
align-items: start;
}
.end__end {
justify-content: flex-end;
align-items: flex-end;
}
.flex {
flex: 1;
}
.flex_5 {
flex: 1 1 5%;
max-width: 5%;
max-height: 100%;
}
.flex_10 {
flex: 1 1 10%;
max-width: 10%;
max-height: 100%;
}
.flex_15 {
flex: 1 1 15%;
max-width: 15%;
max-height: 100%;
}
.flex_20 {
flex: 1 1 20%;
max-width: 20%;
max-height: 100%;
}
.flex_25 {
flex: 1 1 25%;
max-width: 25%;
max-height: 100%;
}
.flex_30 {
flex: 1 1 30%;
max-width: 30%;
max-height: 100%;
}
.flex_33 {
flex: 1 1 33%;
max-width: 33%;
max-height: 100%;
}
.flex_35 {
flex: 1 1 35%;
max-width: 35%;
max-height: 100%;
}
.flex_40 {
flex: 1 1 40%;
max-width: 40%;
max-height: 100%;
}
.flex_45 {
flex: 1 1 45%;
max-width: 45%;
max-height: 100%;
}
.flex_50 {
flex: 1 1 50%;
max-width: 50%;
max-height: 100%;
}
.flex_60 {
flex: 1 1 60%;
max-width: 60%;
max-height: 100%;
}
.flex_70 {
flex: 1 1 70%;
max-width: 70%;
max-height: 100%;
}
.flex_80 {
flex: 1 1 80%;
max-width: 80%;
max-height: 100%;
}
.flex_90 {
flex: 1 1 90%;
max-width: 90%;
max-height: 100%;
}
.flex_100 {
flex: 1 1 100%;
max-width: 100%;
max-height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment