searchInput.wxss 1.17 KB
/* components/searchInput/searchInput.wxss */
.search-input {
  position: relative;
  float: left;
  width: 100%;
  height: 40rpx;
  box-sizing: border-box;
}

.w90 {
  width: 100%;
}

.search-input .search {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: 100%;
  font-size: 24rpx;
  color: #999;
  line-height: 40rpx;
  display: flex;
  align-items: center;
}

.search-input .search .image {
  width: 32rpx;
  height: 32rpx;
  margin-right: 7rpx;
}

.search-input .input {
  height: 100%;
  width: 100%;
  
  box-sizing: border-box;
  font-size: 28rpx;
}

.w90 .search {
  display: none;
}
.w90 .input {
  width: calc(100% - 57rpx);
  color: #333;
}

.w90 .clear {
  position: absolute;
  width: 57rpx;
  height: 40rpx;
  top: 0;
  right: 0;
}

.w90 .clear .image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28rpx;
  height: 28rpx;
}
.w90~.search-cancel{
  display: block;
}
.search-cancel {
  display: none;
  float: left;
  width: 10%;
  height: 40rpx;
  line-height: 40rpx;
  font-size: 24rpx;
  color: #666;
  text-align: right;
}