
/*连续英文、数字换行*/
.wordbreak {
    word-break: break-all;
    word-wrap: break-word;
}

/*单行文字超出显示省略号*/
.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.one_ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.two_ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.three_ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}


/* 流式布局 */
.flex {
    display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
    display: -moz-box; /* Firefox 17- */
    display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
    display: -moz-flex; /* Firefox 18+ */
    display: -ms-flexbox; /* IE 10 */
    display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
}

/* (一)容器的属性 */

/* ================flex-direction属性决定主轴的方向（即项目的排列方向）。 */

/* row（默认值）：主轴为水平方向，起点在左端。 */
.direction-row {
    flex-direction: row;
    -webkit-flex-direction: row;
    -moz-flex-direction: row;
    -ms-flex-direction: row;
}

/* 主轴为水平方向，起点在右端。 */
.direction-row-reverse {
    flex-direction: row-reverse;
    flex-direction: -webkit-row-reverse;
    flex-direction: -moz-row-reverse;
    flex-direction: -ms-row-reverse;
}

/* 主轴为垂直方向，起点在上沿。 */
.direction-column {
    -webkit-box-direction: normal;
    -webkit-box-orient: vertical;
    -moz-flex-direction: column;
    -webkit-flex-direction: column;
    flex-direction: column;
}

/* 轴为垂直方向，起点在下沿。 */
.direction-column-reverse {
    -moz-flex-direction: column-reverse;
    -webkit-flex-direction: column-reverse;
    flex-direction: column-reverse;
}

/* =========================flex-wrap属性 ，默认情况下，项目都排在一条线（又称"轴线"）上*/

/* nowrap（默认）：不换行。 */
.flex-nowrap {
    -webkit-flex-wrap: nowrap;
    -moz-flex-wrap: nowrap;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
}

/* wrap：换行，第一行在上方。 */
.flex-wrap {
    -webkit-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* wrap-reverse：换行，第一行在下方 */

.wrap-reverse {
    -webkit-flex-wrap: wrap-reverse;
    -moz-flex-wrap: wrap-reverse;
    -ms-flex-wrap: wrap-reverse;
    flex-wrap: wrap-reverse;
}

/* flex-flow属性是flex-direction属性和flex-wrap属性的简写形式，默认值为row nowrap。 */

.row-nowrap {
    -webkit-flex-flow: row nowrap;
    -moz-flex-flow: row nowrap;
    -ms-flex-flow: row nowrap;
    flex-flow: row nowrap;
}

.row-wrap {
    -webkit-flex-flow: row wrap;
    -moz-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
}

.row-wrap-reverse {
    -webkit-flex-flow: row wrap-reverse;
    -moz-flex-flow: row wrap-reverse;
    -ms-flex-flow: row wrap-reverse;
    flex-flow: row wrap-reverse;
}

.column-wrap {
    -webkit-flex-flow: column wrap;
    -moz-flex-flow: column wrap;
    -ms-flex-flow: column wrap;
    flex-flow: column wrap;
}

.column-nowrap {
    -webkit-flex-flow: column nowrap;
    -moz-flex-flow: column nowrap;
    -ms-flex-flow: column nowrap;
    flex-flow: column nowrap;
}

.column-wrap-reverse {
    -webkit-flex-flow: column wrap-reverse;
    -moz-flex-flow: column wrap-reverse;
    -ms-flex-flow: column wrap-reverse;
    flex-flow: column wrap-reverse;
}

/* justify-content属性定义了项目在主轴上的对齐方式。 */
.flex-start {
    -webkit-box-pack: flex-start;
    -moz-justify-content: flex-start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
}

.flex-center {
    -webkit-box-pack: center;
    -moz-justify-content: center;
    -webkit-justify-content: center;
    justify-content: center;
}

.flex-end {
    -webkit-box-pack: flex-end;
    -moz-justify-content: flex-end;
    -webkit-justify-content: flex-end;
    justify-content: flex-end;
}

.flex-between {
    -webkit-box-pack: space-between;
    -moz-justify-content: space-between;
    -webkit-justify-content: space-between;
    justify-content: space-between;
}

.flex-around {
    -webkit-box-pack: space-around;
    -moz-justify-content: space-around;
    -webkit-justify-content: space-around;
    justify-content: space-around;
}

/*==================== align-items属性定义项目在交叉轴上如何对齐。 */
/* 交叉轴的起点对齐。 */
.flex-align-start {
    -webkit-box-align: flex-start;
    -moz-align-items: flex-start;
    -webkit-align-items: flex-start;
    align-items: flex-start;
}

/* 交叉轴的中点对齐。 */
.flex-align-center {
    -webkit-box-align: center;
    -moz-align-items: center;
    -webkit-align-items: center;
    align-items: center;
}

/* 交叉轴的终点对齐。 */
.flex-align-end {
    -webkit-box-align: flex-end;
    -moz-align-items: flex-end;
    -webkit-align-items: flex-end;
    align-items: flex-end;
}

/* 项目的第一行文字的基线对齐。 */
.flex-align-baseline {
    -webkit-box-align: baseline;
    -moz-align-items: baseline;
    -webkit-align-items: baseline;
    align-items: baseline;
}

/* stretch（默认值）：如果项目未设置高度或设为auto，将占满整个容器的高度。 */
.flex-align-stretch {
    -webkit-box-align: stretch;
    -moz-align-items: stretch;
    -webkit-align-items: stretch;
    align-items: stretch;
}

/* ==========align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线，该属性不起作用。 */

/* 与交叉轴的起点对齐 */
.align-content-start {
    -webkit-align-content: flex-start;
    -moz-align-content: flex-start;
    -ms-align-content: flex-start;
    align-content: flex-start;
}

/* 与交叉轴的终点对齐。 */
.align-content-end {
    -webkit-align-content: flex-end;
    -moz-align-content: flex-end;
    -ms-align-content: flex-end;
    align-content: flex-end;
}

/* 与交叉轴的中点对齐。 */
.align-content-center {
    -webkit-align-content: center;
    -moz-align-content: center;
    -ms-align-content: center;
    align-content: center;
}

/* space-between：与交叉轴两端对齐，轴线之间的间隔平均分布。 */
.align-content-between {
    -webkit-align-content: space-between;
    -moz-align-content: space-between;
    -ms-align-content: space-between;
    align-content: space-between;
}

/* space-around：每根轴线两侧的间隔都相等。所以，轴线之间的间隔比轴线与边框的间隔大一倍。 */
.align-content-around {
    -webkit-align-content: space-around;
    -moz-align-content: space-around;
    -ms-align-content: space-around;
    align-content: space-around;
}

/* stretch（默认值）：轴线占满整个交叉轴。 */
.align-content-stretch {
    -webkit-align-content: stretch;
    -moz-align-content: stretch;
    -ms-align-content: stretch;
    align-content: stretch;
}

/* 二、项目的属性 */

/* order属性定义项目的排列顺序。数值越小，排列越靠前，默认为0。 */
/* flex-grow属性定义项目的放大比例，默认为0，即如果存在剩余空间，也不放大。 */
/* flex-shrink属性定义了项目的缩小比例，默认为1，即如果空间不足，该项目将缩小。 */
/* flex-basis属性定义了在分配多余空间之前，项目占据的主轴空间（main size）。浏览器根据这个属性，
计算主轴是否有多余空间。它的默认值为auto，即项目的本来大小。 */
/* flex属性是flex-grow, flex-shrink 和 flex-basis的简写，默认值为0 1 auto。后两个属性可选。 */

/* align-self属性允许单个项目有与其他项目不一样的对齐方式，可覆盖align-items属性。
默认值为auto
表示继承父元素的align-items属性，如果没有父元素，则等同于stretch。
align-self: auto | flex-start | flex-end | center | baseline | stretch;
*/

.align-self-start {
    -webkit-align-self: flex-start;
    -moz-align-self: flex-start;
    -ms-align-self: flex-start;
    align-self: flex-start;
}

.align-self-end {
    -webkit-align-self: flex-end;
    -moz-align-self: flex-end;
    -ms-align-self: flex-end;
    align-self: flex-end;
}

.align-self-center {
    -webkit-align-self: center;
    -moz-align-self: center;
    -ms-align-self: center;
    align-self: center;
}

.align-self-baseline {
    -webkit-align-self: baseline;
    -moz-align-self: baseline;
    -ms-align-self: baseline;
    align-self: baseline;
}

.align-self-stretch {
    -webkit-align-self: stretch;
    -moz-align-self: stretch;
    -ms-align-self: stretch;
    align-self: stretch;
}

.flex-1 {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    -moz-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.flex-noShrink {
    flex-shrink: 0;
    -webkit-flex-shrink: 0;
    -moz-flex-shrink: 0;
    -ms-flex-shrink: 0;
    -o-flex-shrink: 0;
}
