[英]How to change value of button in laravel
{{ Form::open(array('' => 'menu/profile', 'files' => true)) }}
{{ Form::file('image') }}
{{ Form::submit('Save changes') }}
{{ Form::close() }}
{{ Form::file('image') }}
這為我提供了value = browse的按鈕。 我可以將其更改為例如上載嗎,並且該按鈕附近也為“未選擇文件”。 我可以以某種方式隱藏它嗎?
這不是與laravel相關,而是特定於瀏覽器。 在IE和FireFox中會顯示“瀏覽”,而在Chrome中顯示“選擇文件”。
有一些解決方法,但是最好不要更改瀏覽器默認值。 但是,如果您仍然想更改文件輸入,請在此處進行檢查
它不是幼蟲的MVC問題。
但是可以,您可以使用以下可能的解決方案解決此問題:
劈
input[type='file'] {
opacity:0
}
要么
設定寬度/高度
input[type="file"]{
opacity:0;
height:48px;
width:48px;
}
或只是玩寬度
input[type='file'] {
width: 95px;
}
已在Chrome 20,Safari 5.1.7和IE 9上進行測試。
或使其透明
input[type='file'] {
color: transparent;
}
<input type='file'/>
見鏈接:
http://geniuscarrier.com/how-to-style-a-html-file-upload-button-in-pure-css/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.