自定义上传文件(input type=file)按钮样式

.file {
  width: 130px;
  position: relative;
  display: inline-block;
  background: #fff;
  border: 1px solid #d9d9d9;
  box-shadow: 0 2px 0 rgb(0 0 0 / 2%);
  border-radius: 3px;
  padding: 4px 12px;
  overflow: hidden;
  color: rgba(0, 0, 0, 0.85);
  text-decoration: none;
  text-indent: 0;
  /* line-height: 20px; */
  text-align: center;
  margin-right: 15px;
}
.file input {
  position: absolute;
  font-size: 100px;
  right: 0;
  top: 0;
  opacity: 0;
}
.file:hover {
  /* background: #aadffd; */
  border-color: #40a9ff;
  color: #40a9ff;
  text-decoration: none;
}

你可能感兴趣的:(Css,css3,css,html)