【问题标题】:Resize placeholder text to fit input text field bootstrap调整占位符文本以适应输入文本字段引导
【发布时间】:2014-10-26 20:00:27
【问题描述】:

我有一个表单中的输入字段:

<div class="form-group">
    <h2><label class="control-label">Email Id*</label></h2>
    <input type="text" name="entry.724320362" value="" class="form-control" id="entry_724320362" dir="auto"
           required="true" placeholder="Email id with which you have registered for The portal"/>
</div>

此表单在浏览器中显示时会显示完整的占位符文本。但是在移动设备上,它会将其剪辑为:

那么有什么方法可以使用引导程序(或其他方式)我可以使占位符调整大小以适应文本字段或换行?

【问题讨论】:

    标签: html css twitter-bootstrap


    【解决方案1】:

    您可以使用 besudo 类来设置占位符的样式:

    ::-webkit-input-placeholder {}
    
    :-moz-placeholder {}
    
    ::-moz-placeholder {}
    
    :-ms-input-placeholder {}
    

    【讨论】:

      猜你喜欢
      • 2016-02-21
      • 2018-11-07
      • 2011-11-14
      • 1970-01-01
      • 2011-03-27
      • 1970-01-01
      • 2021-05-16
      • 2018-03-07
      • 1970-01-01
      相关资源
      最近更新 更多