--- id: bad87fee1348bd9aed908845 title: 給表單輸入框添加樣式 challengeType: 0 forumTopicId: 18312 required: - link: >- https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css raw: true dashedName: style-text-inputs-as-form-controls --- # --description-- 可以在 submit `button` 元素內加上 ``,來添加 Font Awesome 的 `fa-paper-plane` 圖標。 爲表單的文本輸入框(text input)設置 `form-control` class。 爲表單的提交(submit)按鈕設置 `btn btn-primary` class, 併爲它加上 Font Awesome 的 `fa-paper-plane` 圖標。 所有文本輸入類的元素如 ``,`