laravel 5表单提交按钮的Bootstrap类

时间:2016-04-09 10:03:41

标签: laravel-5

以下是输入字段和提交按钮的一部分。enter image description here

我想使用bootstrap将提交按钮的宽度增加为输入字段。

这是我的代码。

 <div class="form-group col-md-6">
 {!! Form::label('Event Photo') !!}
 </div>
 <div class="form-group col-md-6">
 <input type='file' name='photo' id ='photo' class ='form-control'/>
 </div>
<div class="form-group col-md-12">
    {!! Form::submit('Add', array('class'=>'btn btn-primary')) !!}
</div>

但按钮尺寸不能像这样增加。我哪里错了?我该如何解决?

2 个答案:

答案 0 :(得分:2)

表单的array()部分允许您传入您想要的任何其他参数。

正如您使用它来定义类一样,您可以使用它来定义style

<div class="form-group col-md-12">
    {!! Form::submit('Add', array('class'=>'btn btn-primary', 'style' => 'width:50px;)) !!}
</div>

只需将50px更改为您想要使用的宽度。

答案 1 :(得分:0)

添加班级btn-lg将有效。

您可以在documentation

中找到
相关问题