CSS:表单

表单后端

<input>是行内块级元素,能设置宽和高;网站

(<form action=””>)ui

单行文本框:<input type=text value=默认值 name=””>spa

密码框:<input type=password value=默认值>orm

下拉列表:<select>  <option></option></select>ci

单选按钮:<input type=radio  name=一组属性要一致 checked>input

复合按钮:<input type=checkbox name=一组属性要一致 checked>it

按钮:<input type=submit value=””>io

(submit)提交按钮/重置(reset)按钮/普通(button)按钮)form

多行文本框:<textarea></textarea>

<input type=date >//日期

<input type=range>//范围

<input type=email>//邮箱

<input type=number>//

阿里大于网站(电话发短信验证码:)

获取焦点:<label for=想要点击用户名获取表单的焦点id>用户名:</label>

Input去掉焦点样式:outline:none;

文本缩进:text-indent:2px;

字与字之间的间隔:Letter-spacing;

必填:required;

每个name的内容提交给后端

placeholder:文本框內的提示内容;

<fieldset>//可设置宽度和高度

<legend>选中下面的项试试</legend>

</fieldset>给表单加外边框

相关文章
相关标签/搜索