Use CSS to automatically add 'required field' asterisk to form inputs

前端 未结 16 2790
有刺的猬
有刺的猬 2020-11-28 19:10

What is a good way to overcome the unfortunate fact that this code will not work as desired:

16条回答
  •  臣服心动
    2020-11-28 19:45

    You can achieve the desired result by encapsulating the HTML code in a div tag which contains the "required' class followed by the "form-group" class. *however this works only if you have Bootstrap.

提交回复
热议问题