首页技术html表单样式大全 精美form表单css样式

html表单样式大全 精美form表单css样式

编程之家2026-06-151204次浏览

大家好,今天来为大家解答html表单样式大全这个问题的一些问题点,包括精美form表单css样式也一样很多人还不知道,因此呢,今天就来为大家分析分析,现在让我们一起来看看吧!如果解决了您的问题,还望您关注下本站哦,谢谢~

html表单样式大全 精美form表单css样式

求html代码大全 要详细的~~

下面是常用的html代码,按字母顺序排列。希望能帮到你。祝福你,朋友!

DTD:指示在哪种 XHTML 1.0 DTD中允许该标签。S=Strict, T=Transitional, F=Frameset.

标签描述 DTD

<!--...-->定义注释。 STF

<!DOCTYPE>定义文档类型。 STF

<a>定义锚。 STF

html表单样式大全 精美form表单css样式

<abbr>定义缩写。 STF

<acronym>定义只取首字母的缩写。 STF

<address>定义文档作者或拥有者的联系信息。 STF

<applet>不赞成使用。定义嵌入的 applet。 TF

<area>定义图像映射内部的区域。 STF

<b>定义粗体字。 STF

html表单样式大全 精美form表单css样式

<base>定义页面中所有链接的默认地址或默认目标。 STF

<basefont>不赞成使用。定义页面中文本的默认字体、颜色或尺寸。 TF

<bdo>定义文字方向。 STF

<big>定义大号文本。 STF

<blockquote>定义长的引用。 STF

<body>定义文档的主体。 STF

<br>定义简单的折行。 STF

<button>定义按钮(push button)。 STF

<caption>定义表格标题。 STF

<center>不赞成使用。定义居中文本。 TF

<cite>定义引用(citation)。 STF

<code>定义计算机代码文本。 STF

<col>定义表格中一个或多个列的属性值。 STF

<colgroup>定义表格中供格式化的列组。 STF

<dd>定义定义列表中项目的描述。 STF

<del>定义被删除文本。 STF

<dir>不赞成使用。定义目录列表。 TF

<div>定义文档中的节。 STF

<dfn>定义定义项目。 STF

<dl>定义定义列表。 STF

<dt>定义定义列表中的项目。 STF

<em>定义强调文本。 STF

<fieldset>定义围绕表单中元素的边框。 STF

<font>不赞成使用。定义文字的字体、尺寸和颜色。 TF

<form>定义供用户输入的 HTML表单。 STF

<frame>定义框架集的窗口或框架。 F

<frameset>定义框架集。 F

<h1> to<h6>定义 HTML标题。 STF

<head>定义关于文档的信息。 STF

<hr>定义水平线。 STF

<html>定义 HTML文档。 STF

<i>定义斜体字。 STF

<iframe>定义内联框架。 TF

<img>定义图像。 STF

<input>定义输入控件。 STF

<ins>定义被插入文本。 STF

<isindex>不赞成使用。定义与文档相关的可搜索索引。 TF

<kbd>定义键盘文本。 STF

<label>定义 input元素的标注。 STF

<legend>定义 fieldset元素的标题。 STF

<li>定义列表的项目。 STF

<link>定义文档与外部资源的关系。 STF

<map>定义图像映射。 STF

<menu>不赞成使用。定义菜单列表。 TF

<meta>定义关于 HTML文档的元信息。 STF

<noframes>定义针对不支持框架的用户的替代内容。 TF

<noscript>定义针对不支持客户端脚本的用户的替代内容。 STF

<object>定义内嵌对象。 STF

<ol>定义有序列表。 STF

<optgroup>定义选择列表中相关选项的组合。 STF

<option>定义选择列表中的选项。 STF

<p>定义段落。 STF

<param>定义对象的参数。 STF

<pre>定义预格式文本。 STF

<q>定义短的引用。 STF

<s>不赞成使用。定义加删除线的文本。 TF

<samp>定义计算机代码样本。 STF

<script>定义客户端脚本。 STF

<select>定义选择列表(下拉列表)。 STF

<small>定义小号文本。 STF

<span>定义文档中的节。 STF

<strike>不赞成使用。定义加删除线文本。 TF

<strong>定义强调文本。 STF

<style>定义文档的样式信息。 STF

<sub>定义下标文本。 STF

<sup>定义上标文本。 STF

<table>定义表格。 STF

<tbody>定义表格中的主体内容。 STF

<td>定义表格中的单元。 STF

<textarea>定义多行的文本输入控件。 STF

<tfoot>定义表格中的表注内容(脚注)。 STF

<th>定义表格中的表头单元格。 STF

<thead>定义表格中的表头内容。 STF

<title>定义文档的标题。 STF

<tr>定义表格中的行。 STF

<tt>定义打字机文本。 STF

<u>不赞成使用。定义下划线文本。 TF

<ul>定义无序列表。 STF

<var>定义文本的变量部分。 STF

<xmp>不赞成使用。定义预格式文本。

HTML表单介绍

HTML表单(Form)是HTML的一个重要部分,主要用于采集和提交用户输入的信息。

举个简单的例子,一个让用户输入姓名的HTML表单(Form)。示例代码如下:

form action="

请输入你的姓名:
input type="text" name="yourname"
input type="submit" value="提交"
/form

学习HTML表单(Form)最关键要掌握的有三个要点:

表单控件(Form Controls)

Action

Method
先说表单控件(Form Controls),通过HTML表单的各种控件,用户可以输入文字信息,或者从选项中选择,以及做提交的操作。比如上面的例句里,input type="text"就是一个表单控件,表示一个单行输入框。

用户填入表单的信息总是需要程序来进行处理,表单里的action就指明了处理表单信息的文件。比如上面例句里的

至于method,表示了发送表单信息的方式。method有两个值:get和post。get的方式是将表单控件的name/value信息经过编码之后,通过URL发送(你可以在地址栏里看到)。而post则将表单的内容通过http发送,你在地址栏看不到表单的提交信息。那什么时候用get,什么时候用post呢?一般是这样来判断的,如果只是为取得和显示数据,用get;一旦涉及数据的保存和更新,那么建议用post。

HTML表单(Form)常用控件(Controls)
HTML表单(Form)常用控件有:

表单控件(Form Contros)说明

input type="text"单行文本输入框

input type="submit"将表单(Form)里的信息提交给表单里action所指向的文件

input type="checkbox"复选框

input type="radio"单选框

select下拉框

textArea多行文本输入框

input type="password"密码输入框(输入的文字用*表示)

表单控件(Form Control):单行文本输入框(input type="text")
单行文本输入框允许用户输入一些简短的单行信息,比如用户姓名。例句如下:

input type="text" name="yourname"

表单控件(Form Control):复选框(input type="checkbox")
复选框允许用户在一组选项里,选择多个。示例代码:

input type="checkbox" name="fruit" value="apple"苹果br
input type="checkbox" name="fruit" value="orange"桔子br
input type="checkbox" name="fruit" value="mango"芒果br

用checked表示缺省已选的选项。

input type="checkbox" name="fruit" value="orange" checked桔子br

表单控件(Form Control):单选框(input type="radio")
使用单选框,让用户在一组选项里只能选择一个。示例代码:

input type="radio" name="fruit" value="Apple"苹果br
input type="radio" name="fruit" value="Orange"桔子br
input type="radio" name="fruit" value="Mango"芒果br

用checked表示缺省已选的选项。

input type="radio" name="fruit" value="Orange" checked桔子br

表单控件(Form Control):下拉框(select)
下拉框(Select)既可以用做单选,也可以用做复选。单选例句如下:

select name="fruit"

option value="apple"苹果

option value="orange"桔子

option value="mango"芒果
/select

如果要变成复选,加muiltiple即可。用户用Ctrl来实现多选。例句:

select name="fruit" multiple

用户还可以用size属性来改变下拉框(Select)的大小。

表单控件(Form Control):多行输入框(textarea)
多行输入框(textarea)主要用于输入较长的文本信息。例句如下:

textarea name="yoursuggest" cols="50" rows="3"/textarea
其中cols表示textarea的宽度,rows表示textarea的高度。

表单控件(Form Control):密码输入框(input type="password")
密码输入框(input type="password")主要用于一些保密信息的输入,比如密码。因为用户输入的时候,显示的不是输入的内容,而是黑点符号。。例句如下:

input type="password" name="yourpw"

表单控件(Form Control):提交(input type="submit")
通过提交(input type=submit)可以将表单(Form)里的信息提交给表单里action所指向的文件。例句如下:

input type="submit" value="提交"

表单控件(Form Control):图片提交(input type="image")
input type=image相当于 input type=submit,不同的是,input type=image以一个图片作为表单的提交按钮,其中 src属性表示图片的路径。

input type="image" src="images/icons/go.gif"

alt="提交" NAME="imgsubmit"

CSS语言大全

CSS语言大全,如下:

字体属性:(font)

大小{font-size: x-large;}(特大) xx-small;(极小)一般中文用不到,只要用数值就可以,单位:PX、PD

样式{font-style: oblique;}(偏斜体) italic;(斜体) normal;(正常)

行高{line-height: normal;}(正常)单位:PX、PD、EM

粗细{font-weight: bold;}(粗体) lighter;(细体) normal;(正常)

变体{font-variant: small-caps;}(小型大写字母) normal;(正常)

大小写{text-transform: capitalize;}(首字母大写) uppercase;(大写) lowercase;(小写) none;(无)

修饰{text-decoration: underline;}(下划线) overline;(上划线) line-through;(删除线) blink;(闪烁)

常用字体:(font-family)

"Courier New", Courier, monospace,"Times New Roman", Times, serif, Arial, Helvetica, sans-serif, Verdana

背景属性:(background)

色彩{background-color:#FFFFFF;}

图片{background-image: url();}

重复{background-repeat: no-repeat;}

滚动{background-attachment: fixed;}(固定) scroll;(滚动)

位置{background-position: left;}(水平) top(垂直);

简写方法{background:#000 url(..) repeat fixed left top;}/*简写·这个在阅读代码中经常出现,要认真的研究*/

区块属性:(Block)/*这个属性第一次认识,要多多研究*/

字间距{letter-spacing: normal;}数值/*这个属性似乎有用,多实践下*/

对齐{text-align: justify;}(两端对齐) left;(左对齐) right;(右对齐) center;(居中)

缩进{text-indent:数值px;}

垂直对齐{vertical-align: baseline;}(基线) sub;(下标) super;(下标) top; text-top; middle; bottom; text-bottom;

词间距word-spacing: normal;数值

空格white-space: pre;(保留) nowrap;(不换行)

显示{display:block;}(块) inline;(内嵌) list-item;(列表项) run-in;(追加部分) compact;(紧凑) marker;(标记) table; inline-table; table-raw-group; table-header-group; table-footer-group; table-raw; table-column-group; table-column; table-cell; table-caption;(表格标题)/*display属性的了解很模糊*/

方框属性:(Box)

width:; height:; float:; clear:both; margin:; padding:;顺序:上右下左

边框属性:(Border)

border-style: dotted;(点线) dashed;(虚线) solid; double;(双线) groove;(槽线) ridge;(脊状) inset;(凹陷) outset;

border-width:;边框宽度

border-color:#;

简写方法border:width style color;/*简写*/

列表属性:(List-style)

类型list-style-type: disc;(圆点) circle;(圆圈) square;(方块) decimal;(数字) lower-roman;(小罗码数字) upper-roman; lower-alpha; upper-alpha;

位置list-style-position: outside;(外) inside;

图像list-style-image: url(..);

定位属性:(Position)

Position: absolute; relative; static;

visibility: inherit; visible; hidden;

overflow: visible; hidden; scroll; auto;

clip: rect(12px,auto,12px,auto)(裁切)

css属性代码大全

一 CSS文字属性:

color:#999999;/*文字颜色*/

font-family:宋体,sans-serif;/*文字字体*/

font-size: 9pt;/*文字大小*/

font-style:itelic;/*文字斜体*/

font-variant:small-caps;/*小字体*/

letter-spacing: 1pt;/*字间距离*/

line-height: 200%;/*设置行高*/

font-weight:bold;/*文字粗体*/

vertical-align:sub;/*下标字*/

vertical-align:super;/*上标字*/

text-decoration:line-through;/*加删除线*/

text-decoration: overline;/*加顶线*/

text-decoration:underline;/*加下划线*/

text-decoration:none;/*删除链接下划线*/

text-transform: capitalize;/*首字大写*/

text-transform: uppercase;/*英文大写*/

text-transform: lowercase;/*英文小写*/

text-align:right;/*文字右对齐*/

text-align:left;/*文字左对齐*/

text-align:center;/*文字居中对齐*/

text-align:justify;/*文字分散对齐*/

vertical-align属性

vertical-align:top;/*垂直向上对齐*/

vertical-align:bottom;/*垂直向下对齐*/

vertical-align:middle;/*垂直居中对齐*/

vertical-align:text-top;/*文字垂直向上对齐*/

vertical-align:text-bottom;/*文字垂直向下对齐*/

二、CSS边框空白

padding-top:10px;/*上边框留空白*/

padding-right:10px;/*右边框留空白*/

padding-bottom:10px;/*下边框留空白*/

padding-left:10px;/*左边框留空白

三、CSS符号属性:

list-style-type:none;/*不编号*/

list-style-type:decimal;/*阿拉伯数字*/

list-style-type:lower-roman;/*小写罗马数字*/

list-style-type:upper-roman;/*大写罗马数字*/

list-style-type:lower-alpha;/*小写英文字母*/

list-style-type:upper-alpha;/*大写英文字母*/

list-style-type:disc;/*实心圆形符号*/

list-style-type:circle;/*空心圆形符号*/

list-style-type:square;/*实心方形符号*/

list-style-image:url(/dot.gif);/*图片式符号*/

list-style-position: outside;/*凸排*/

list-style-position:inside;/*缩进*/

四、CSS背景样式:

background-color:#F5E2EC;/*背景颜色*/

background:transparent;/*透视背景*/

background-image: url(/image/bg.gif);/*背景图片*/

background-attachment: fixed;/*浮水印固定背景*/

background-repeat: repeat;/*重复排列-网页默认*/

background-repeat: no-repeat;/*不重复排列*/

background-repeat: repeat-x;/*在x轴重复排列*/

background-repeat: repeat-y;/*在y轴重复排列*/

指定背景位置

background-position: 90% 90%;/*背景图片x与y轴的位置*/

background-position: top;/*向上对齐*/

background-position: buttom;/*向下对齐*/

background-position: left;/*向左对齐*/

background-position: right;/*向右对齐*/

background-position: center;/*居中对齐*/

五、CSS连接属性:

a/*所有超链接*/

a:link/*超链接文字格式*/

a:visited/*浏览过的链接文字格式*/

a:active/*按下链接的格式*/

a:hover/*鼠标转到链接*/

鼠标光标样式:

链接手指 CURSOR: hand

十字体 cursor:crosshair

箭头朝下 cursor:s-resize

十字箭头 cursor:move

箭头朝右 cursor:move

加一问号 cursor:help

箭头朝左 cursor:w-resize

箭头朝上 cursor:n-resize

箭头朝右上 cursor:ne-resize

箭头朝左上 cursor:nw-resize

文字I型 cursor:text

箭头斜右下 cursor:se-resize

箭头斜左下 cursor:sw-resize

漏斗 cursor:wait

光标图案(IE6) p{cursor:url("光标文件名.cur"),text;}

六、CSS框线一览表:

border-top: 1px solid#6699cc;/*上框线*/

border-bottom: 1px solid#6699cc;/*下框线*/

border-left: 1px solid#6699cc;/*左框线*/

border-right: 1px solid#6699cc;/*右框线*/

以上是建议书写方式,但也可以使用常规的方式如下:

border-top-color:#369/*设置上框线top颜色*/

border-top-width:1px/*设置上框线top宽度*/

border-top-style: solid/*设置上框线top样式*/

其他框线样式

solid/*实线框*/

dotted/*虚线框*/

double/*双线框*/

groove/*立体内凸框*/

ridge/*立体浮雕框*/

inset/*凹框*/

outset/*凸框*/

七、CSS表单运用:

文字方块

按钮

复选框

选择钮

多行文字方块

下拉式菜单选项1选项2

八、CSS边界样式:

margin-top:10px;/*上边界*/

margin-right:10px;/*右边界值*/

margin-bottom:10px;/*下边界值*/

margin-left:10px;/*左边界值*/

CSS属性:字体样式(Font Style)

序号中文说明标记语法

1字体样式{font:font-style font-variant font-weight font-size font-family}

2字体类型{font-family:"字体1","字体2","字体3",...}

3字体大小{font-size:数值|inherit| medium| large| larger| x-large| xx-large| small| smaller| x-small| xx-small}

4字体风格{font-style:inherit|italic|normal|oblique}

5字体粗细{font-weight:100-900|bold|bolder|lighter|normal;}

6字体颜色{color:数值;}

7阴影颜色{text-shadow:16位色值}

8字体行高{line-height:数值|inherit|normal;}

9字间距{letter-spacing:数值|inherit|normal}

10单词间距{word-spacing:数值|inherit|normal}

11字体变形{font-variant:inherit|normal|small-cps}

12英文转换{text-transform:inherit|none|capitalize|uppercase|lowercase}

13字体变形{font-size-adjust:inherit|none}

14字体{font-stretch:condensed|expanded|extra-condensed|extra-expanded|inherit|narrower|normal| semi-condensed|semi-expanded|ultra-condensed|ultra-expanded|wider}

文本样式(Text Style)

序号中文说明标记语法

1行间距{line-height:数值|inherit|normal;}

2文本修饰{text-decoration:inherit|none|underline|overline|line-through|blink}

3段首空格{text-indent:数值|inherit}

4水平对齐{text-align:left|right|center|justify}

5垂直对齐{vertical-align:inherit|top|bottom|text-top|text-bottom|baseline|middle|sub|super}

6书写方式{writing-mode:lr-tb|tb-rl}

背景样式

序号中文说明标记语法

1背景颜色{background-color:数值}

2背景图片{background-image: url(URL)|none}

3背景重复{background-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}

4背景固定{background-attachment:fixed|scroll}

5背景定位{background-position:数值|top|bottom|left|right|center}

6背影样式{background:背景颜色|背景图象|背景重复|背景附件|背景位置}

框架样式(Box Style)

序号中文说明标记语法

1边界留白{margin:margin-top margin-right margin-bottom margin-left}

2补白{padding:padding-top padding-right padding-bottom padding-left}

3边框宽度{border-width:border-top-width border-right-width border-bottom-width border-left-width}

宽度值: thin|medium|thick|数值

4边框颜色{border-color:数值数值数值数值}数值:分别代表top、right、bottom、left颜色值

5边框风格{border-style:none|hidden|inherit|dashed|solid|double|inset|outset|ridge|groove}

6边框{border:border-width border-style color}

上边框{border-top:border-top-width border-style color}

右边框{border-right:border-right-width border-style color}

下边框{border-bottom:border-bottom-width border-style color}

左边框{border-left:border-left-width border-style color}

7宽度{width:长度|百分比| auto}

8高度{height:数值|auto}

9漂浮{float:left|right|none}

10清除{clear:none|left|right|both}

分类列表

序号中文说明标记语法

1控制显示{display:none|block|inline|list-item}

2控制空白{white-space:normal|pre|nowarp}

3符号列表{list-style-type:disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha|upper-alpha|none}

4图形列表{list-style-image:URL}

5位置列表{list-style-position:inside|outside}

6目录列表{list-style:目录样式类型|目录样式位置|url}

7鼠标形状{cursor:hand|crosshair|text|wait|move|help|e-resize|nw-resize|w-resize|s-resize|se-resize|sw-resize}

END,本文到此结束,如果可以帮助到大家,还望关注本站哦!

tan正切定理 tan等于哪边比哪边2022高考志愿ai填报系统 2022ai志愿填报系统准确吗 比较靠谱的有哪个