如何使用css隐藏具有简单跨度的文件上载

如何使用css隐藏具有简单跨度的文件上载,css,Css,我正在使用这个文件上传器 但由于某些原因,“添加文件”按钮也会显示文件上载。我想把它们像链接一样隐藏起来。当前外观 我复制了他们使用的css <span class="btn btn-success fileinput-button"> <i class="glyphicon glyphicon-plus"></i> <span>Add files...</span> <inpu

我正在使用这个文件上传器 但由于某些原因,“添加文件”按钮也会显示文件上载。我想把它们像链接一样隐藏起来。当前外观

我复制了他们使用的css

 <span class="btn btn-success fileinput-button">
        <i class="glyphicon glyphicon-plus"></i>
        <span>Add files...</span>
        <input type="file" name="files[]" multiple>
</span>


.fileinput-button {
  position: relative;
  overflow: hidden;
}



 .btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.428571429;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

input[type="file"] {
display: block;      
}

添加文件。。。
.fileinput按钮{
位置:相对位置;
溢出:隐藏;
}
.btn{
显示:内联块;
填充:6px 12px;
页边距底部:0;
字体大小:14px;
字体大小:正常;
线高:1.428571429;
文本对齐:居中;
空白:nowrap;
垂直对齐:中间对齐;
光标:指针;
边框:1px实心透明;
边界半径:4px;
-webkit用户选择:无;
-moz用户选择:无;
-ms用户选择:无;
-o-用户选择:无;
用户选择:无;
}
输入[type=“file”]{
显示:块;
}

尝试:
可见性:隐藏
;)

您缺少一些css。检查它只是缺少图标,但如何工作你想要它

.btn-success {
color: #fff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: 400;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.fileinput-button input {
position: absolute;
top: 0;
right: 0;
margin: 0;
opacity: 0;
-ms-filter: 'alpha(opacity=0)';
font-size: 200px;
direction: ltr;
cursor: pointer;
}
input[type=file] {
display: block;
}

通过设置隐藏的可见性,按钮的区域保持不变。我想用一个示例按钮来展示它们,你还没有在这个和这个中找到正确的代码吗?非常感谢..我想,我的css文件中缺少了一些东西,上面的内容对我有用。什么?这是正确答案吗?你觉得怎么样?我只是用链接中的一个替换了我的两个css文件,它对我很有用。非常感谢。什么是css规则集。btn和输入?请检查更新的问题