Bootstrap:更宽的输入字段 [英] Bootstrap: wider input field

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

问题描述

如何使输入字段比 Twitter 的 Bootstrap 中的默认值更宽?

How can I make the input field wider than the default in Twitter's Bootstrap?

我正在尝试在 hero-unit 类中创建更广泛的搜索表单rel="noreferrer">示例.

I am trying to create a wider search form in the hero-unit class from the example.

推荐答案

使用内置类 input-large, input-medium, ... : <代码>

Use the bootstrap built in classes input-large, input-medium, ... : <input type="text" class="input-large search-query">

或者使用你自己的css:

Or use your own css:

  1. 给元素一个唯一的类名 class="search-query input-mysize"
  2. 将此添加到您的 css 文件中(不是 bootstrap.less 或 css 文件):
    .input-mysize { 宽度:150px }

这篇关于Bootstrap:更宽的输入字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆