【问题标题】:how to display specific number of letters of paragraph in HTML如何在 HTML 中显示特定数量的段落字母
【发布时间】:2023-02-04 04:29:07
【问题描述】:

我正在寻找缩短 HTML 段落的解决方案

假设我有一段 <p>This is some text</p> 现在我想知道的是如何让这一段显示更少的行。例如,它没有显示完整的段落,而是只显示前 4 行,这导致 <p>This</p>

【问题讨论】:

    标签: html


    【解决方案1】:
    <input maxlength="number1">
    <input minlength="number2">
    

    例子:用户名:

    <input type="text" name="username"
            maxlength="12"><br><br>
    

    密码:

     <input type="password" name="password"
                maxlength="10"><br><br>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-01-12
      • 2016-08-09
      • 2021-03-11
      • 2016-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多