form-inline 输入的长度 [英] Lenght of form-inline's input

查看:19
本文介绍了form-inline 输入的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用col"符号使内联表单输入更宽?

至于现在输入字段很短或者可以像这样用size加宽:

 

<form action="index.php" method="GET" class="form-inline" role="form"><input class="form-control" size=50 name="email"/>

但是如何拉伸输入以适应列?

解决方案

理想情况下,您应该将 form-control 放在 form-group 中,然后应用col-*form group..

<div class="form-group col-sm-8"><input class="form-control" placeholder="输入邮箱" type="email">

<div class="form-group"><input class="form-control" placeholder="密码" type="密码">

<button type="submit" class="btn btn-default">登录</button></表单>

http://www.bootply.com/116928

How to use "col" notation to make inline form input wider?

As for now input field is short or can be widen with size like this:

 <div class="row">

        <form action="index.php" method="GET" class="form-inline" role="form">


            <input class="form-control"  size=50  name="email" />

But how to stretch the input to fit columns?

解决方案

Ideally, you'd put your form-control inside a form-group, and then apply the col-* to the form group..

<form class="form-inline" role="form">
  <div class="form-group col-sm-8">
    <input class="form-control" placeholder="Enter email" type="email">
  </div>
  <div class="form-group">
    <input class="form-control" placeholder="Password" type="password">
  </div>
  <button type="submit" class="btn btn-default">Sign in</button>
</form>

http://www.bootply.com/116928

这篇关于form-inline 输入的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
其他开发最新文章
热门教程
热门工具
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆