代码之家  ›  专栏  ›  技术社区  ›  Felix

将jqueryuicss应用于textarea元素

  •  2
  • Felix  · 技术社区  · 16 年前

    我在大学里使用jQuery UI进行基于Web的开发。我把一些表格放进了一个对话框,所以我得到了一些元素,比如

    <label for="name">ID user</label><input type="text" name="iduser" size="15" id="iduser" class="text ui-widget-content ui-corner-all" maxlength=12  />
    

    <label for="name">Description</label><textarea name="description" id="description" class="text ui-widget-content ui-corner-all" value=""></textarea>
    

    3 回复  |  直到 16 年前
        1
  •  3
  •   Nick Craver    16 年前

    jqueryui样式没有 .text

    input { font-family: Arial; }
    /* or... */
    input.text { font-family: Arial; }
    

    但是 <textarea> <input> 包括那些 <文本区域> 元素:

    .text { font-family: Arial; } /* doesn't care what tag */
    /* or...add both specifically */
    input.text, textarea.text { font-family: Arial; }
    
        2
  •  12
  •   Eldelshell    14 年前

    只需添加:

    class="ui-widget ui-state-default ui-corner-all"
    

        3
  •  0
  •   Germán Rodríguez    16 年前