Laravel形式输入字段设置高度和宽度 [英] Laravel form input field set height and width
本文介绍了Laravel形式输入字段设置高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试在laravel 5中设置输入字段的宽度。有人知道为什么它不起作用?
{!! Form :: input('text','table_list',null,array('required'=>'required','width'=> 100))}}
解决方案
通过css输入:
{!! Form :: input('text','table_list',null,array('required'=>'required','class'=>'foo'))!!}
然后定义 .foo
类:
.foo {
width:100px;
}
I try to set width of input field in laravel 5. Anybody know why is it not working?
{!! Form::input('text','table_list', null, array('required'=>'required','width' => 100)) !!}
解决方案
As per the docs:
Note: The width attribute is used only with
<input type="image">
.
Meaning you will have to style your text inputs via css:
{!! Form::input('text','table_list', null, array('required'=>'required','class' => 'foo')) !!}
And then define the .foo
class:
.foo {
width: 100px;
}
这篇关于Laravel形式输入字段设置高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文