【问题标题】:Bootstrap 3 input padding issueBootstrap 3输入填充问题
【发布时间】:2014-06-06 21:24:02
【问题描述】:

我有一个 bootstrap 3 网页,我正在尝试增加输入的填充。我的代码如下:

input[type='text'],
input[type='password'],
input[type='email'],
textarea
{
  padding-top:18px;
  padding-bottom:18px;
  -webkit-appearance: none;
}

Here's a JSFiddle

但在 Firefox 上,文本丢失。发生了什么事?

【问题讨论】:

    标签: html css forms twitter-bootstrap input


    【解决方案1】:

    Bootstrap 设置默认高度。你只需要添加height: auto:

    input[type='text'],
    input[type='password'],
    input[type='email'],
    textarea
    {
      padding-top:18px;
      padding-bottom:18px;
      -webkit-appearance: none;
      height: auto;
    }
    

    updated fiddle

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-18
      • 2020-08-23
      • 2012-02-06
      • 2012-12-11
      • 2019-01-30
      • 2020-12-26
      • 2013-12-04
      • 1970-01-01
      相关资源
      最近更新 更多