什么是HTML中的表单控件? [英] What is a form control in HTML?

查看:319
本文介绍了什么是HTML中的表单控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在研究如何用HTML编写表单时,我看到提到术语表单控件

特别是使用Twitter Bootstrap,它有类似 form-control 和 control-label

究竟什么是表单控件?

When researching how to write forms in HTML I see mention of the term "form control".
In particular using Twitter Bootstrap which has classes like form-control and control-label.
What exactly is a "form control"?

推荐答案

这只是Bootstrap的造型:从 bootstrap的页面

It's just a styling thing for Bootstrap: From bootstrap's page:

单个表单控件自动接收一些全局样式。所有文字< input> < textarea> < select> .form-control 的元素默认设置为 width:100%; 。在 .form-group 中包装标签和控件以获得最佳间距。

Individual form controls automatically receive some global styling. All textual <input>, <textarea>, and <select> elements with .form-control are set to width: 100%; by default. Wrap labels and controls in .form-group for optimum spacing.

一般来说,根据@the_velour_fog的评论它是:

Generally, as per @the_velour_fog 's comment it's:

它似乎不仅仅是一个样式的东西:似乎表单控件只引用HTML表单中的各个HTML元素,例如来自 https://html.spec.whatwg.org/multipage/forms.html;表单是具有表单控件的网页的组件,例如文本字段,按钮,复选框,范围控件或颜色选择器。

it seems to be more than just a styling thing: it seems form control just refers to the individual HTML elements in a HTML form e.g. from https://html.spec.whatwg.org/multipage/forms.html; A form is a component of a Web page that has form controls, such as text fields, buttons, checkboxes, range controls, or colour pickers.

这篇关于什么是HTML中的表单控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆