mixin.scss 1.57 KB
// 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;
}
.city {
  font-family: '微软雅黑';
  background: rgba(0, 0, 0, 0);
  width: 249px;
  height: 60px;
  font-size: 36px;
  text-align: center;
  border: 1px #1a1a1a solid;
  border-radius: 5px;
}
.text-button {
  border: none;
  background-color: transparent;
  color: #328985;
  font-size: 24px;
  text-decoration: underline;
  cursor: pointer;
}
//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;
}
/*定义滚动条高宽及背景
 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
  width: 16px;
  height: 16px;
  background-color: #f5f5f5;
  z-index: 999;
}
/*定义滚动条轨道
  内阴影+圆角*/
::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  background-color: #f5f5f5;
}
/*定义滑块
  内阴影+圆角*/
::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  background-color: #555;
}