html上传文件问题

img

我想要达到的结果

如图所示,我想改下按钮的名称,不知道能不能改
还有一个问题是按钮旁边的文字能不能取消

https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E7%A4%BA%E4%BE%8B

img


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width= , initial-scale=1.0">
  <title>Document</title>
</head>
<body id="body">
  <input type="file">
</body>
</html>
<style>
  input[type=file] {
    height: 40px;
    width: 100px;
    position: relative;
    visibility: hidden;
  }
  input[type=file]::before{
    position: absolute;
    content: '选择文件';
    background-color: #000;
    width: 100px;
    height: 40px;
    visibility: initial;
    color:#fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
</style>

可以用伪元素魔改这个东西
记得点采纳

可以采纳我这篇博客https://www.cnblogs.com/yqPhare/p/15950724.html