HTML5 textarea placeholder not appearing

后端 未结 9 1832
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-29 16:02

I cannot figure out what is wrong with my markup, but the placeholder for the text area will not appear. It seems as though it may be covered up with some blank spaces and t

9条回答
  •  暖寄归人
    2020-11-29 16:45

    I had the same issue, only using a .pug file (similar to .jade). I realized that it was also a space issue, following the end of my closing parentheses. In my example, you need to highlight the text after (placeholder="YOUR MESSAGE") to see:

    BEFORE:

    form.form-horizontal(method='POST')
      .form-group
        textarea.form-control(placeholder="YOUR MESSAGE") 
      .form-group  
        button.btn.btn-primary(type='submit') SUBMIT
    

    AFTER:

    form.form-horizontal(method='POST')
      .form-group
        textarea.form-control(placeholder="YOUR MESSAGE")
      .form-group  
        button.btn.btn-primary(type='submit') SUBMIT
    

提交回复
热议问题