我试图更改按钮(输入)的样式,但不起作用:
<input type="file" class="custom-file-input">
.my-input
{
background: linear-gradient(top, #f9f9f9, #e3e3e3);
border: 1px solid #999;
border-radius: 3px;
padding: 5px 8px;
cursor: pointer;
text-shadow: 1px 1px #fff;
font-weight: 700;
font-size: 14px;
}
答案 0 :(得分:0)
type =“ file”无法设置样式
<label class="file-label">
<input type="file">
</label>
.file-label {
background: linear-gradient(45deg, #f9f9f9, #e3e3e3);
border: 1px solid #999;
border-radius: 3px;
padding: 5px 8px;
cursor: pointer;
text-shadow: 1px 1px #fff;
font-weight: 700;
font-size: 14px;
}
.file-label > input {
visibility: hidden;
}