Html 如何使用reactjs更改文件输入的默认文本?

Html 如何使用reactjs更改文件输入的默认文本?,html,css,reactjs,input,jsx,Html,Css,Reactjs,Input,Jsx,我的jsx上有一个输入文件,我想更改文本“Choisir un fichier”和“Aucun fichier choisi” 我的代码是: <div className="form-group"> <label className="control-label col-sm-2" ><strong>Site - Logo (150 x 30px)</strong></label> <div className="

我的jsx上有一个输入文件,我想更改文本“Choisir un fichier”和“Aucun fichier choisi”

我的代码是:

<div className="form-group">
    <label className="control-label col-sm-2" ><strong>Site - Logo (150 x 30px)</strong></label>
    <div className="col-sm-10">
        <input type="file" className="form-control-file" onChange={this.handleImgLogoChange} style={{border:'.1rem solid #d9d9d9', borderRadius:'.2rem'}}/>
    </div>
</div>

站点-徽标(150 x 30px)
当我运行它时,我得到:

如何更改输入文件的默认文本?


        <div style={{width: 80, height: 80, border: '1px solid red', position: 'relative'}}>
          <label for='file' style={{position: 'absolute', width: 80, height: 80, cursor: 'pointer'}}>select file</label>
          <input id='file' type='file' onChange={this.handleFileUpload} style={{opacity: 0}} />
        </div> 
选择文件
也许是这样


你可以在

上查看在线演示,如果我理解正确,我们讨论的是
输入
样式。如果这是一个
输入
,则由
占位符
负责。看这里,看看是否有帮助。()@al bulat我讲的是标准输入文件按钮的文本我讲的是标准输入文件按钮的文本首先,文件的输入类型不是更改默认文本,你必须使用另一种方式来模拟标准输入文件按钮的文本