【问题标题】:CSS: give the same width to the text and password inputsCSS:为文本和密码输入提供相同的宽度
【发布时间】:2010-06-23 17:57:02
【问题描述】:

我正在尝试为文本和密码输入提供相同的宽度。

所以我写了这个:

input[type="text","password"]{

    width: 138px;

}

但它不起作用。

有什么帮助吗?

问候

贾维

【问题讨论】:

    标签: css input css-selectors


    【解决方案1】:

    怎么样:

    input[type="text"], input[type="password"]
    {
        width: 138px;
    }
    

    或者你使用类/ID:

    input.text, input.password
    {
        width: 138px;
    }
    

    【讨论】:

      【解决方案2】:

      怎么样?

      input[type="text"],
      input[type="password"]{
        width: 138px;
      }
      

      【讨论】:

        【解决方案3】:
        input[type="text"], input[type="password"]
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2018-11-24
          • 2014-05-04
          • 1970-01-01
          • 2012-02-15
          • 1970-01-01
          • 2013-04-20
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多