use-on-demand
Version:
148 lines (114 loc) • 2.65 kB
CSS
/**
* 包含以下内容:
* 1.flex
* 2.justify-content
* 3.align-items
* 4.align-content
* 5.align-self
*
* 去除的部分:
* 1.和MediaQuery中,分辨率有关的衍生部分。
* 2.和MediaQuery中,设备(如print)有关的衍生部分。
*/
.d-flex {
display : flex ;
}
.d-inline-flex {
display : inline-flex ;
}
.flex-fill {
flex : 1 1 auto ;
}
/*TIP 主轴方向*/
.flex-row {
flex-direction : row ;
}
.flex-column {
flex-direction : column ;
}
.flex-row-reverse {
flex-direction : row-reverse ;
}
.flex-column-reverse {
flex-direction : column-reverse ;
}
/*TIP 主轴距离占比*/
.flex-grow-0 {
flex-grow : 0 ;
}
.flex-grow-1 {
flex-grow : 1 ;
}
/*TIP 主轴对齐方式 */
.justify-content-start {
justify-content : flex-start ;
}
.justify-content-end {
justify-content : flex-end ;
}
.justify-content-center {
justify-content : center ;
}
.justify-content-between {
justify-content : space-between ;
}
.justify-content-around {
justify-content : space-around ;
}
.justify-content-evenly {
justify-content : space-evenly ;
}
/*TIP 侧轴对齐方式*/
.align-items-start {
align-items : flex-start ;
}
.align-items-end {
align-items : flex-end ;
}
.align-items-center {
align-items : center ;
}
.align-items-baseline {
align-items : baseline ;
}
.align-items-stretch {
align-items : stretch ;
}
/*TIP Flex容器内,整体位置微调???*/
.align-content-start {
align-content : flex-start ;
}
.align-content-end {
align-content : flex-end ;
}
.align-content-center {
align-content : center ;
}
.align-content-between {
align-content : space-between ;
}
.align-content-around {
align-content : space-around ;
}
.align-content-stretch {
align-content : stretch ;
}
/*TIP 单个元素,自己覆盖align-items的属性*/
.align-self-auto {
align-self : auto ;
}
.align-self-start {
align-self : flex-start ;
}
.align-self-end {
align-self : flex-end ;
}
.align-self-center {
align-self : center ;
}
.align-self-baseline {
align-self : baseline ;
}
.align-self-stretch {
align-self : stretch ;
}