123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- // mixin
- // 清除浮动
- @mixin clearfix {
- &:after {
- content: "";
- display: table;
- clear: both;
- }
- }
-
- // 多行隐藏
- @mixin textoverflow($clamp:1) {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: $clamp;
- /*! autoprefixer: ignore next */
- -webkit-box-orient: vertical;
- }
-
- //flex box
- @mixin flexbox($jc:space-between, $ai:center, $fd:row, $fw:nowrap) {
- display: flex;
- display: -webkit-flex;
- flex: 1;
- justify-content: $jc;
- -webkit-justify-content: $jc;
- align-items: $ai;
- -webkit-align-items: $ai;
- flex-direction: $fd;
- -webkit-flex-direction: $fd;
- flex-wrap: $fw;
- -webkit-flex-wrap: $fw;
- }
-
- @keyframes slidefade {
- 0% {
- opacity: 0;
- transform: translateX(0);
- }
- 70% {
- opacity: 1;
- transform: translateX(-30%);
- }
- 100% {
- opacity: 0;
- transform: translateX(-30%);
- }
- }
-
- @keyframes downfade {
- 0% {
- opacity: 0;
- transform: translateY(0);
- }
- 70% {
- opacity: 1;
- transform: translateY(20%);
- }
- 100% {
- opacity: 0;
- transform: translateY(20%);
- }
- }
|