{{ Form::open(array('' => 'menu/profile', 'files' => true)) }}
{{ Form::file('image') }}
{{ Form::submit('Save changes') }}
{{ Form::close() }}
{{ Form::file('image') }}
这为我提供了 value=browse 的按钮。 我可以将其更改为例如上传吗,并且该按钮附近还有“未选择文件”。 我能以某种方式隐藏它吗?
最佳答案
这不是幼虫 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'/>
例子 enter link description here
查看链接:
http://geniuscarrier.com/how-to-style-a-html-file-upload-button-in-pure-css/
关于php - 如何在laravel中改变按钮的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25508501/