grass-prompt.scss 1.37 KB
.yoho-grass-prompt {
  position: fixed;
  width: 100%;
  z-index: 10;

  .yoho-grass-prompt-wrap {
    width: 100%;
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    display: flex;
    align-items: center;

    .prompt-thumb {
      width: 100px;
      height: 100px;
    }

    .prompt-info {
      flex-grow: 1;
      margin-left: 20px;

      > * {
        margin-top: 10px;
        overflow: hidden;
        text-overflow:ellipsis;
        white-space: nowrap;

        &:first-child {
          margin-top: 0;
        }
      }

      .prompt-info-title {
        font-size: 32px;
        color: #fff;
      }

      .prompt-info-desc {
        font-size: 24px;
        color: #b0b0b0;
        font-weight: 300;
      }
    }

    .prompt-icon {
      color: #979797;
      font-size: 40px;
    }
  }

  &.yoho-grass-prompt-top {
    top: 0;

    > * {
      bottom: 0;
    }

    .yoho-grass-prompt-enter-active {
      transform: translateY(100%);
    }

    .yoho-grass-prompt-leave-active {
      transform: translateY(-100%);
    }
  }

  &.yoho-grass-prompt-bottom {
    bottom: 0;

    .yoho-grass-prompt-enter-active {
      transform: translateY(-100%);
    }

    .yoho-grass-prompt-leave-active {
      transform: translateY(100%);
    }
  }

  .yoho-grass-prompt-enter-active,
  .yoho-grass-prompt-leave-active {
    transition: all 200ms;
  }
}