common.scss 2.64 KB
.inline-b {
  display: inline-block;
}

.pull-right {
  float: right;
}

.green-text {
  color: #00A854;
}

.gray-text {
  color: #666666;
  margin-left: 6px;
}

.red-text {
  color: rgb(255, 0, 0);
}

.blue-text {
  color: $btnBlue;

  &:hover {
    color: #9994FF;
    cursor: pointer;
  }
}

.pure-blue-text {
  color: $btnBlue !important;
}

.green {
  background-color: #00A854;
}

.red {
  color: rgb(255, 0, 0);
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.additional-text {
  height: 22px;
  font-size: 16px;

  font-weight: 400;
  color: #666666;
  line-height: 22px;
}

.btn-blue {
  height: 32px;
  background: $btnBlue;
  border-radius: 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  color: #FFFFFF;
  padding: 6px 27px;
}

// 单行省略
.ellipsis-1 {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  -o-text-overflow: ellipsis;
  /* for Opera */
}

// 我这里以两行为例,该方法基本兼容市场上面所有主流浏览器。
.ellipsis-2 {
  overflow: hidden;
  height: 40px;
  line-height: 20px;
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  /*显示的行数*/
}

.ellipsis-2-text:after {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 15px;
  padding-left: 20px;
  background: -webkit-linear-gradient(left, transparent, #fff 55%);
  /*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
  background: -o-linear-gradient(left, transparent, #fff 55%);
  background: -moz-linear-gradient(left, transparent, #fff 55%);
  background: linear-gradient(to right, transparent, #fff 55%);
}

.ellipsis-4 {
  overflow: hidden;
  height: 40px;
  line-height: 20px;
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.ellipsis-4-text:after {
  content: "...";
  position: absolute;
  bottom: 0;
  right: 15px;
  padding-left: 20px;
  background: -webkit-linear-gradient(left, transparent, #fff 55%);
  /*我在Safari上测试时发现透明到白色中间会有一个黑色的过渡后来我就写成-webkit-linear-gradient(left,rgba(255,255,255,0),rgba(255,255,255,1) 55%)*/
  background: -o-linear-gradient(left, transparent, #fff 55%);
  background: -moz-linear-gradient(left, transparent, #fff 55%);
  background: linear-gradient(to right, transparent, #fff 55%);
}

.statusText {
  vertical-align: middle;
}

.switch-tip {
  height: 17px;
  line-height: 17px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  font-size: 12px;
  color: #999999;
}