我正在使用MVC 5與bootstrap。如何設計輸入類型文件元素,如下圖所示。如何設計/自定義輸入類型文件元素?
.file-uploader .input-group input, .file-uploader .input-group-btn .button {
height: 35px;
}
.file-uploader .input-group .input-group-addon {
padding: 2px 15px;
font-size: 15px;
font-weight: normal;
line-height: 1;
color: #337ab7;
text-align: center;
background-color: #fff;
border: 1px solid #d6d9e2;
border-radius: 0;
}
<div class="form-group">
<label for="exampleInputEmail1">Logo image</label>
<div class="form-group file-uploader">
<input type="file" name="img[]" class="file">
<div class="input-group col-xs-12">
<span class="input-group-addon"><i class="glyphicon glyphicon-picture"></i></span>
<input type="text" class="form-control input-lg" disabled placeholder="Upload Image">
<span class="input-group-btn">
<button class="browse btn btn-primary" type="button"><i class="glyphicon glyphicon-search"></i>Browse</button>
</span>
</div>
</div>
</div>
請幫我...
的[樣式的輸入類型= 「文件」 按鈕(http://stackoverflow.com/questions/572768/styling-an-input-type-file-button可能的複製) –
我使用[JQuery filestyle](http://markusslima.github.io/jquery-filestyle/)。 – apokryfos