专注前端,专注网页设计制作 - (承接网页制作/模板制作/设计) QQ:755150799 织梦模板 | 网页特效 | 网站模板 | 建站教程 | TOP排行榜 | Tag标签 | 联系我们
当前位置: 网站首页 > 建站教程 > Div+Css教程 > >

html标签属性收藏大全

时间:2014-03-05来源:学技巧网站制作 作者:学技巧 阅读: 次 【 点评一下

学了好久的div+css,以及html,平时收藏积累了不少的html代码属性及用法。今天拿出来给大家参考参考,温故而知新嘛!

...普通卷动
<marquee behavior=slide>...滑动
<marquee behavior=scroll>...预设卷动
<marquee behavior=alternate>...来回卷动
<marquee direction=down>...向下卷动
<marquee direction=up>...向上卷动
<marquee direction=right>向右卷动
<marquee direction=’left’>向左卷动
<marquee loop=2>...卷动次数
<marquee width=180>...设定宽度
<marquee height=30>...设定高度
<marquee bgcolor=FF0000>...设定背景颜色
<marquee scrollamount=30>...设定滚动速度
<marquee scrolldelay=300>...设定卷动时间
<marquee onmouseover="this.stop()">...鼠标经过上面时停止滚动
<marquee onmouseover="this.start()">...鼠标离开时开始滚动
字体效果

...

标题字(最大)


...

标题字(最小)


...粗体字


...粗体字(强调)

(同上效果略同)


...斜体字


...斜体字(强调)


...斜体字(表示定义)


...底线


...底线(表示插入文字)


...横线


...删除线


...删除线(表示删除)


...键盘文字


...

打字体


...

固定宽度字体(在文件中空白、换行、定位功能有效)


...</plaintext>固定宽度字体(不执行标记符号) <wbr></wbr><br /><listing>...</listing><wbr></wbr>固定宽度小字体 <wbr></wbr><br />&lt;font <wbr></wbr>color=00ff00&gt;...字体颜色 <wbr></wbr><br />&lt;font <wbr></wbr>size=1&gt;...最小字体 <wbr></wbr><br />&lt;font <wbr></wbr>style <wbr></wbr>=’font-size:100 <wbr></wbr>px’&gt;...无限增大 <wbr></wbr><br />区断标记 <wbr></wbr><br /><hr />水平线 <wbr></wbr><br />&lt;hr <wbr></wbr>size=’9’&gt;水平线(设定大小) <wbr></wbr><br />&lt;hr <wbr></wbr>width=’80%’&gt;水平线(设定宽度) <wbr></wbr><br />&lt;hr <wbr></wbr>color=’ff0000’&gt;水平线(设定颜色) <wbr></wbr><br /><br />(换行) <wbr></wbr><br /><nobr>...</nobr>水域(不换行) <wbr></wbr><br /><p>...</p>水域(段落) <wbr></wbr><br /><center>...</center>置中 <wbr></wbr><br /><!>连结格式 <wbr></wbr><br />&lt;base <wbr></wbr>href=位址&gt;(预设好连结路径) <wbr></wbr><br />&lt;a <wbr></wbr>href=位址&gt;外部连结 <wbr></wbr><br />&lt;a <wbr></wbr>href=位址 <wbr></wbr>target=’_blank’&gt;外部连结(另开新视窗) <wbr></wbr><br />&lt;a <wbr></wbr>href=位址 <wbr></wbr>target=’_top’&gt;外部连结(全视窗连结) <wbr></wbr><br />&lt;a <wbr></wbr>href=位址 <wbr></wbr>target=’页框名’&gt;外部连结(在指定页框连结) <wbr></wbr><br /><!>贴图/音乐 <wbr></wbr><br />&lt;img <wbr></wbr>src=图片位址&gt;贴图 <wbr></wbr><br />&lt;img <wbr></wbr>src=图片位址 <wbr></wbr>width=’180’&gt;设定图片宽度 <wbr></wbr><br />&lt;img <wbr></wbr>src=图片位址 <wbr></wbr>height=’30’&gt;设定图片高度 <wbr></wbr><br />&lt;img <wbr></wbr>src=图片位址 <wbr></wbr>alt=’提示文字’&gt;设定图片提示文字 <wbr></wbr><br />&lt;img <wbr></wbr>src=图片位址’ <wbr></wbr>border=’1’&gt;设定图片边框 <wbr></wbr><br />&lt;bgsound <wbr></wbr>src=MID音乐档位址&gt;背景音乐设定 <wbr></wbr><br /><!>表格语法 <wbr></wbr><br />&lt;table <wbr></wbr>aling=left&gt;...<table><tr><td></td></tr></table>表格位置,置左 <wbr></wbr><br />&lt;table <wbr></wbr>aling=center&gt;...<table><tr><td></td></tr></table>表格位置,置中 <wbr></wbr><br />&lt;table <wbr></wbr>background=图片路径&gt;...<table><tr><td></td></tr></table>背景图片的URL=就是路径网址 <wbr></wbr><br />&lt;table <wbr></wbr>border=边框大小&gt;...<table><tr><td></td></tr></table>设定表格边框大小(使用数字) <wbr></wbr><br />&lt;table <wbr></wbr>bgcolor=颜色码&gt;...<table><tr><td></td></tr></table>设定表格的背景颜色 <wbr></wbr><br />&lt;table <wbr></wbr>borderclor=颜色码&gt;...<table><tr><td></td></tr></table>设定表格边框的颜色 <wbr></wbr><br />&lt;table <wbr></wbr>borderclordark=颜色码&gt;...<table><tr><td></td></tr></table>设定表格暗边框的颜色 <wbr></wbr><br />&lt;table <wbr></wbr>borderclorlight=颜色码&gt;...<table><tr><td></td></tr></table>设定表格亮边框的颜色 <wbr></wbr><br />&lt;table <wbr></wbr>cellpadding=参数&gt;...<table><tr><td></td></tr></table>指定内容与格线之间的间距(使用数字) <wbr></wbr><br />&lt;table <wbr></wbr>cellspacing=参数&gt;...<table><tr><td></td></tr></table>指定格线与格线之间的距离(使用数字) <wbr></wbr><br />&lt;table <wbr></wbr>cols=参数&gt;...<table><tr><td></td></tr></table>指定表格的栏数 <wbr></wbr><br />&lt;table <wbr></wbr>frame=参数&gt;...<table><tr><td></td></tr></table>设定表格外框线的显示方式 <wbr></wbr><br />&lt;table <wbr></wbr>width=宽度&gt;...<table><tr><td></td></tr></table>指定表格的宽度大小(使用数字) <wbr></wbr><br />&lt;table <wbr></wbr>height=高度&gt;...<table><tr><td></td></tr></table>指定表格的高度大小(使用数字) <wbr></wbr><br />&lt;td <wbr></wbr>colspan=参数&gt;...<table><tbody><tr><td></td></tr></tbody></table>指定储存格合并栏的栏数(使用数字) <wbr></wbr><br />&lt;td <wbr></wbr>rowspan=参数&gt;...<table><tbody><tr><td></td></tr></tbody></table>指定储存格合并列的列数(使用数字) <wbr></wbr><br />分割视窗 <wbr></wbr><br />&lt;frameset <wbr></wbr>cols=&quot;20%,*&quot;&gt;左右分割,将左边框架分割大小为20%右边框架的大小浏览器会自动调整 <wbr></wbr><br />&lt;frameset <wbr></wbr>rows=&quot;20%,*&quot;&gt;上下分割,将上面框架分割大小为20%下面框架的大小浏览器会自动调整 <wbr></wbr><br />&lt;frameset <wbr></wbr>cols=&quot;20%,*&quot;&gt;分割左右两个框架 <wbr></wbr><br />&lt;frameset <wbr></wbr>cols=&quot;20%,*,20%&quot;&gt;分割左中右三个框架 <wbr></wbr><br />&lt;分割上下两个框架 <wbr></wbr><br />&lt;frameset <wbr></wbr>rows=&quot;20%,*,20%&quot;&gt;分割上中下三个框架 <wbr></wbr><br />属性: <wbr></wbr><br />cols <wbr></wbr>垂直切割窗口(如左右分割两个窗口)接受整数值,百分数,*(*代表占用余下空间)数值的个数代表分成的部分数目,要以逗号分隔。例:cols=&quot;30,*,50%&quot;可以 <wbr></wbr>切成三个视窗,第一部分是30像素(pixels)为绝对分割,第二部分是当分配完第一和第三视图后剩下的空间,第三部分则占整个窗口的50%宽度,为相对分割。 <wbr></wbr><br />rows <wbr></wbr>就是横向切割,将窗口上下分开,数值设置同上。 <wbr></wbr><br />以上两属性尽量不要在同一个<frameset>标记中,因为王井(netscape)不支持,尽量采用多重分割。 <wbr></wbr><br />frameborder <wbr></wbr>设置框架的边框,其值有0不要边框,1要边框。 <wbr></wbr><br />border <wbr></wbr>设置框架边框厚度 <wbr></wbr><br />framespacing <wbr></wbr>表示框架与框架间保留空白的距离 <wbr></wbr><br />frame <wbr></wbr>元素(单标签) <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;frame <wbr></wbr>name=&quot;&quot; <wbr></wbr>src=&quot;url&quot; <wbr></wbr>scrolling=&quot;yes/no&quot; <wbr></wbr>noresize&gt;<wbr></wbr><br />属性: <wbr></wbr><br />name <wbr></wbr>框架名称,指定框架来做连接的目标窗口。 <wbr></wbr><br />src <wbr></wbr>框架中要显示的网页文当url地址,每个个框架要对应一个html文挡。 <wbr></wbr><br />scrolling <wbr></wbr>是否显示滚动条,yes/no,auto是自动。 <wbr></wbr><br />noresize <wbr></wbr>设置不让使用者改变这个框架的大小, <wbr></wbr><br />noframe元素 <wbr></wbr><br />指定当使用了框架的页面在不支持框架的浏览器中打开时显示的信息 <wbr></wbr><br />语法格式: <wbr></wbr><br /><noframe><wbr></wbr><br />...... <wbr></wbr><br /></noframe><wbr></wbr><br />表单<form></form><wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;form <wbr></wbr>action=&quot;url&quot; <wbr></wbr>method=&quot;get/post&quot;&gt;<wbr></wbr><br />.... <wbr></wbr><br />&lt;input <wbr></wbr>type=submit&gt;&lt;input <wbr></wbr>type=reset&gt;<wbr></wbr><br /><form></form><wbr></wbr><br />method有两种提交方式get,post <wbr></wbr><br />action <wbr></wbr>是指明处理该表单的程序位置,这样表单所填的资料才能传给cgi做处里,可设定此参数为action=&quot;mailto:lwr8494@163.com&quot; <wbr></wbr>这样此表单所填的资料将会发送到这个邮箱地址。 <wbr></wbr><br />method <wbr></wbr>是指传送信息给cgi等网络程序的方式。可选post方法, <wbr></wbr>get方法,post方法容许传送大量信息。get方法只接受低于1k的信息。 <wbr></wbr><br />申请表单用的是post搜索引擎用的是get <wbr></wbr><br /><wbr></wbr><br />&lt;! <wbr></wbr>- <wbr></wbr>- <wbr></wbr>... <wbr></wbr>- <wbr></wbr>-&gt;<wbr></wbr>注解 <wbr></wbr><br />&lt;A <wbr></wbr>HREF <wbr></wbr>TARGET&gt;<wbr></wbr>指定超连结的分割视窗 <wbr></wbr><br />&lt;A <wbr></wbr>HREF=#锚的名称&gt;<wbr></wbr>指定锚名称的超连结 <wbr></wbr><br />&lt;A <wbr></wbr>HREF&gt;<wbr></wbr>指定超连结 <wbr></wbr><br />&lt;A <wbr></wbr>NAME=锚的名称&gt;<wbr></wbr>被连结点的名称 <wbr></wbr><br /><address>....</address><wbr></wbr>用来显示电子邮箱地址 <wbr></wbr><br /><strong><wbr></wbr>粗体字 <wbr></wbr><br />&lt;BASE <wbr></wbr>TARGET&gt;<wbr></wbr>指定超连结的分割视窗 <wbr></wbr><br />&lt;BASEFONT <wbr></wbr>SIZE&gt;<wbr></wbr>更改预设字形大小 <wbr></wbr><br />&lt;BGSOUND <wbr></wbr>SRC&gt;<wbr></wbr>加入背景音乐 <wbr></wbr><br /><big><wbr></wbr>显示大字体 <wbr></wbr><br /><blink><wbr></wbr>闪烁的文字 <wbr></wbr><br />&lt;BODY <wbr></wbr>TEXT <wbr></wbr>LINK <wbr></wbr>VLINK&gt;<wbr></wbr>设定文字颜色 <wbr></wbr><br /><body><wbr></wbr>显示本文 <wbr></wbr><br /><br /><wbr></wbr>换行 <wbr></wbr><br />&lt;CAPTION <wbr></wbr>ALIGN&gt;<wbr></wbr>设定表格标题位置 <wbr></wbr><br /><caption>...</caption><wbr></wbr>为表格加上标题 <wbr></wbr><br /><center><wbr></wbr>向中对齐 <wbr></wbr><br /><cite>...<cite><wbr></wbr>用於引经据典的文字 <wbr></wbr><br /><code>...</code><wbr></wbr>用於列出一段程式码 <wbr></wbr><br /><comment>...</comment><wbr></wbr>加上注解 <wbr></wbr><br /><dl><dd><wbr></wbr>设定定义列表的项目解说 <wbr></wbr><br /><dfn>...</dfn><wbr></wbr>显示&quot;定义&quot;文字 <wbr></wbr><br /><dir></dir>...<dir></dir><wbr></wbr>列表文字标签 <wbr></wbr><br /><dl><dd>...</dd></dl><wbr></wbr>设定定义列表的标签 <wbr></wbr><br /><dl><dt><wbr></wbr>设定定义列表的项目 <wbr></wbr><br /><em><wbr></wbr>强调之用 <wbr></wbr><br />&lt;FONT <wbr></wbr>FACE&gt;<wbr></wbr>任意指定所用的字形 <wbr></wbr><br />&lt;FONT <wbr></wbr>SIZE&gt;<wbr></wbr>设定字体大小 <wbr></wbr><br />&lt;FORM <wbr></wbr>ACTION&gt;<wbr></wbr>设定户动式表单的处理方式 <wbr></wbr><br />&lt;FORM <wbr></wbr>METHOD&gt;<wbr></wbr>设定户动式表单之资料传送方式 <wbr></wbr><br />&lt;FRame <wbr></wbr>MARGINHEIGHT&gt;<wbr></wbr>设定视窗的上下边界 <wbr></wbr><br />&lt;FRame <wbr></wbr>MARGINWIDTH&gt;<wbr></wbr>设定视窗的左右边界 <wbr></wbr><br />&lt;FRame <wbr></wbr>NAME&gt;<wbr></wbr>为分割视窗命名 <wbr></wbr><br />&lt;FRame <wbr></wbr>NORESIZE&gt;<wbr></wbr>锁住分割视窗的大小 <wbr></wbr><br />&lt;FRame <wbr></wbr>SCROLLING&gt;<wbr></wbr>设定分割视窗的卷轴 <wbr></wbr><br />&lt;FRame <wbr></wbr>SRC&gt;<wbr></wbr>将HTML档加入视窗 <wbr></wbr><br />&lt;FRameSET <wbr></wbr>COLS&gt;<wbr></wbr>将视窗分割成左右的子视窗 <wbr></wbr><br />&lt;FRameSET <wbr></wbr>ROWS&gt;<wbr></wbr>将视窗分割成上下的子视窗 <wbr></wbr><br /><frameset>...</frameset><wbr></wbr>划分分割视窗 <wbr></wbr><br /><h1>~<h6><wbr></wbr>设定文字大小 <wbr></wbr><br /><head><wbr></wbr></head>标示文件资讯 <wbr></wbr><br /><hr /><wbr></wbr>加上分格线 <wbr></wbr><br /><html><wbr></wbr></html>文件的开始与结束 <wbr></wbr><br /><em><wbr></wbr>斜体字 <wbr></wbr><br />&lt;IMG <wbr></wbr>ALIGN&gt;<wbr></wbr>调整图形影像的位置 <wbr></wbr><br />&lt;IMG <wbr></wbr>ALT&gt;<wbr></wbr>为你的图形影像加注 <wbr></wbr><br />&lt;IMG <wbr></wbr>DYNSRC <wbr></wbr>LOOP&gt;<wbr></wbr>加入影片 <wbr></wbr><br />&lt;IMG <wbr></wbr>HEIGHT <wbr></wbr>WIDTH&gt;<wbr></wbr>插入图片并预设图形大小 <wbr></wbr><br />&lt;IMG <wbr></wbr>HSPACE&gt;<wbr></wbr>插入图片并预设图形的左右边界 <wbr></wbr><br />&lt;IMG <wbr></wbr>LOWSRC&gt;<wbr></wbr>预载图片功能 <wbr></wbr><br />&lt;IMG <wbr></wbr>SRC <wbr></wbr>BORDER&gt;<wbr></wbr>设定图片边界 <wbr></wbr><br />&lt;IMG <wbr></wbr>SRC&gt;<wbr></wbr>插入图片 <wbr></wbr><br />&lt;IMG <wbr></wbr>VSPACE&gt;<wbr></wbr>插入图片并预设图形的上下边界 <wbr></wbr><br />&lt;INPUT <wbr></wbr>TYPE <wbr></wbr>NAME <wbr></wbr>value&gt;<wbr></wbr>在表单中加入输入栏位 <wbr></wbr><br /><isindex><wbr></wbr></isindex>定义查询用表单 <wbr></wbr><br /><kbd>...</kbd><wbr></wbr>表示使用者输入文字 <wbr></wbr><br />&lt;LI <wbr></wbr>TYPE&gt;...<ul><li><p><br /></p></li><wbr></wbr></ul>列表的项目 <wbr></wbr>( <wbr></wbr>可指定符号 <wbr></wbr>) <wbr></wbr><br /><marquee><wbr></wbr>跑马灯效果 <wbr></wbr><br /><menu></menu>...<menu></menu><wbr></wbr>条列文字标签 <wbr></wbr><br />&lt;meta <wbr></wbr>NAME=&quot;REFRESH&quot; <wbr></wbr>CONTENT <wbr></wbr>URL&gt;<wbr></wbr>自动更新文件内容 <wbr></wbr><br /><multiple><wbr></wbr>可同时选择多项的列表栏 <wbr></wbr><br /><noframe><wbr></wbr>定义不出现分割视窗的文字 <wbr></wbr><br /><ol><li><p>...</p></li></ol><wbr></wbr>有序号的列表 <wbr></wbr><br /><select><option><wbr></wbr>定义表单中列表栏的项目 <wbr></wbr><br />&lt;P <wbr></wbr>ALIGN&gt;<wbr></wbr>设定对齐方向 <wbr></wbr><br /><p><wbr></wbr>分段 <wbr></wbr><br /><person>...</person><wbr></wbr>显示人名 <wbr></wbr><br /><pre><wbr></wbr>使用原有排列 <wbr></wbr><br /><samp>...</samp><wbr></wbr>用於引用字 <wbr></wbr><br /><select <wbr></wbr>>...<select <wbr></wbr><select <wbr /></select <wbr />><wbr></wbr>在表单中定义列表栏 <wbr></wbr><br /><small><wbr></wbr>显示小字体 <wbr></wbr><br /><strike><wbr></wbr>文字加横线 <wbr></wbr><br /><strong><wbr></wbr>用於加强语气 <wbr></wbr><br /><sub><wbr></wbr>下标字 <wbr></wbr><br /><sup><wbr></wbr>上标字 <wbr></wbr><br />&lt;TABLE <wbr></wbr>BORDER=n&gt;<wbr></wbr>调整表格的宽线高度 <wbr></wbr><br />&lt;TABLE <wbr></wbr>CELLPADDING&gt;<wbr></wbr>调整资料栏位之边界 <wbr></wbr><br />&lt;TABLE <wbr></wbr>CELLSPACING&gt;<wbr></wbr>调整表格线的宽度 <wbr></wbr><br />&lt;TABLE <wbr></wbr>HEIGHT&gt;<wbr></wbr>调整表格的高度 <wbr></wbr><br />&lt;TABLE <wbr></wbr>WIDTH&gt;<wbr></wbr>调整表格的宽度 <wbr></wbr><br /><table><tr><td>...</td></tr></table><wbr></wbr>产生表格的标签 <wbr></wbr><br />&lt;TD <wbr></wbr>ALIGN&gt;<wbr></wbr>调整表格栏位之左右对齐 <wbr></wbr><br />&lt;TD <wbr></wbr>BGCOLOR&gt;<wbr></wbr>设定表格栏位之背景颜色 <wbr></wbr><br />&lt;TD <wbr></wbr>COLSPAN <wbr></wbr>ROWSPAN&gt;<wbr></wbr>表格栏位的合并 <wbr></wbr><br />&lt;TD <wbr></wbr>NOWRAP&gt;<wbr></wbr>设定表格栏位不换行 <wbr></wbr><br />&lt;TD <wbr></wbr>VALIGN&gt;<wbr></wbr>调整表格栏位之上下对齐 <wbr></wbr><br />&lt;TD <wbr></wbr>WIDTH&gt;<wbr></wbr>调整表格栏位宽度 <wbr></wbr><br /><table><tbody><tr><td>...</td><wbr></wbr></tr></tbody></table>定义表格的资料栏位 <wbr></wbr><br />&lt;TEXTAREA <wbr></wbr>NAME <wbr></wbr>ROWS <wbr></wbr>COLS&gt;<wbr></wbr>表单中加入多少列的文字输入栏 <wbr></wbr><br />&lt;TEXTAREA <wbr></wbr>WRAP&gt;<wbr></wbr>决定文字输入栏是自动否换行 <wbr></wbr><br /><table><tbody><tr><th>...</th><wbr></wbr></tr></tbody></table>定义表格的标头栏位 <wbr></wbr><br /><title><wbr></wbr>文件标题 <wbr></wbr><br /><table><tbody><tr></tr></tbody></table>...<table><tbody><tr></tr><wbr></wbr></tbody></table>定义表格美一行 <wbr></wbr><br /><tt><wbr></wbr>打字机字体 <wbr></wbr><br /><span style="text-decoration:underline;"><wbr></wbr>文字加底线 <wbr></wbr><br />&lt;UL <wbr></wbr>TYPE&gt;...<ul><li><p><br /></p></li></ul><wbr></wbr>无序号的列表 <wbr></wbr>( <wbr></wbr>可指定符号 <wbr></wbr>) <wbr></wbr><br /><var>...</var><wbr></wbr>用於显示变数 <wbr></wbr><br />BlockQuotc文本缩进 <wbr></wbr><br />表示颜色的有三种方式; <wbr></wbr><br />1,16进制颜色代码 <wbr></wbr><br />语法:#RRGGBB <wbr></wbr><br />例:&lt;font <wbr></wbr>color=&quot;#ff0000&quot;&gt;红色<wbr></wbr><br />2,10进制RGB码 <wbr></wbr><br />语法:RGB(RRR,GGG,BBB) <wbr></wbr><br />例:&lt;font <wbr></wbr>color=&quot;rgb(255,000,000)&quot;&gt;红色<wbr></wbr><br />3,直接用颜色的英文名称 <wbr></wbr><br />例:&lt;font <wbr></wbr>color=&quot;red&quot;&gt;红色<wbr></wbr><br /><body>.....</body>属性可分为三种: <wbr></wbr><br />1,背景属性 <wbr></wbr><br />包括:bgcolor,background <wbr></wbr><br />2,文字属性: <wbr></wbr><br />包括:text,link,alink,vlink, <wbr></wbr><br />3,留白属性: <wbr></wbr><br />其中分为:leftmargin,topmargin <wbr></wbr><br />.bgcolor背景色 <wbr></wbr><br />语法格式:&lt;body <wbr></wbr>bgcolor=&quot;#ff0000&quot;&gt;<wbr></wbr><br />.background背景图案。 <wbr></wbr><br />语法格式:&lt;body <wbr></wbr>background=&quot;url&quot;&gt;<wbr></wbr><br />.text文本颜色(非连接文字颜色) <wbr></wbr><br />.link连接文字颜色(可连接文字颜色) <wbr></wbr><br />.alink活动连接文字颜色(正被点击的可连接文字的颜色) <wbr></wbr><br />.vlink已访问连接文字颜色)(已经点击访问过的可连接文字的颜色) <wbr></wbr><br />语法格式:&lt;body <wbr></wbr>text=&quot;color&quot; <wbr></wbr>link=&quot;color&quot; <wbr></wbr>alink=&quot;color&quot; <wbr></wbr>vlink=&quot;color&quot;&gt;<wbr></wbr><br />.leftmargin <wbr></wbr>页面左侧的留白距离 <wbr></wbr><br />.topmargin <wbr></wbr>页面顶部的留白距离 <wbr></wbr><br />语法格式:&lt;body <wbr></wbr>leftmargin=&quot;value&quot; <wbr></wbr>topmargin=&quot;value&quot;&gt;<wbr></wbr><br />注:value为长度值为数字 <wbr></wbr><br />align <wbr></wbr>属性 <wbr></wbr><br />语法:&lt;h2 <wbr></wbr>align=&quot;?&quot;&gt;文字<h2></h2><wbr></wbr><br />其属性有三种:left靠左,center居中,right靠右 <wbr></wbr><br />〈p〉</span></tt></title></sup></sub></strong></strike></small></pre></p>为段落标记,可利用以上属性对整个段落进行设置 <wbr></wbr><br />〈br&gt;为换行标记 <wbr></wbr><br /><nobr></nobr>为不换行标记 <wbr></wbr>放在文字两边即可 <wbr></wbr><br />例:<body><wbr></wbr><br /><h3>江南逢李龟年</h3><wbr></wbr><br /><p>歧王宅里寻常见<br /><wbr></wbr><br />催九堂前几度闻<br /><wbr></wbr><br />正是江南好风景<br /><wbr></wbr><br />落花时节又逢君</p><wbr></wbr><br /></body><wbr></wbr><br />预格式化: <wbr></wbr><br /><pre>......</pre><wbr></wbr>浏览是效果和编写是效果格式一样 <wbr></wbr><br />列表 <wbr></wbr><br />1无序列表又称符号列表 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;ul <wbr></wbr>type=&quot;&quot;&gt;type的属性可选直disc实心圆点,clrcle空心圆点,square实心方框 <wbr></wbr><br /><ul><li><p>文字</p></li><wbr></wbr><br /><li><p>文字</p></li><wbr></wbr><br /></ul><wbr></wbr><br />2有序列表 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;ol <wbr></wbr>type=&quot;?&quot; <wbr></wbr>start&quot;?&quot;&gt;<wbr></wbr><br /><ul><li><p>文字</p></li><wbr></wbr><br /><li><p>文字</p></li><wbr></wbr><br /><ol><li><p><br /></p></li></ol><wbr></wbr><br /></ul>type的值是编号字符可选的有1...,a...,A...,i... <wbr></wbr>,I... <wbr></wbr><br />start为起始值例:如果start为3是那么将从3开始,而且必须是数字。 <wbr></wbr><br />3定义列表 <wbr></wbr><br /><dl><dd>定义列表标记 <wbr></wbr><br /><dl><dt>标示定义条目 <wbr></wbr><br /><dl><dd>标示定义内容 <wbr></wbr><br />语法格式: <wbr></wbr><br /><dl><wbr></wbr><br /><dt>文字</dt><wbr></wbr><br /><dd>文字内容</dd><wbr></wbr><br /></dl><wbr></wbr><br />连接和图像 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;a <wbr></wbr>href=&quot;url&quot; <wbr></wbr>name=&quot;?&quot; <wbr></wbr>target=&quot;?&quot; <wbr></wbr>title=&quot;?&quot;&gt;....<wbr></wbr><br />属性:href <wbr></wbr>连接目标 <wbr></wbr>值可以是url地址也可以是连接锚点 <wbr></wbr><br />&lt;a <wbr></wbr>href=&quot;url&quot;&gt;...或者 <wbr></wbr><br />&lt;a <wbr></wbr>href=&quot;锚点&quot;&gt;...<wbr></wbr><br />name <wbr></wbr>连接名称 <wbr></wbr><br />语法格式:&lt;a <wbr></wbr>name=&quot;锚点名称&quot;&gt;...<wbr></wbr><br />例:&lt;a <wbr></wbr>name=&quot;abcdcf&quot;&gt;...<wbr></wbr><br />连接到该锚点的连接则应是: <wbr></wbr><br />&lt;a <wbr></wbr>name=&quot;#abcdef&quot;&gt;....<wbr></wbr><br />target目标窗口语法格式: <wbr></wbr><br />&lt;a <wbr></wbr>href=&quot;url&quot;target=&quot;_blank|_self|_farent|_top|windowname&quot;&gt;....<wbr></wbr><br />-blank打开新窗口 <wbr></wbr><br />_self当前窗口打开 <wbr></wbr><br />一下两个仅在框架叶面中应用 <wbr></wbr><br />_parent当前窗口的父级窗口(上一级)打开 <wbr></wbr><br />_top在最高一级的窗口打开 <wbr></wbr><br />windowname已命名的窗口或框架中打开连接 <wbr></wbr><br />title连接提示 <wbr></wbr><br />&lt;a <wbr></wbr>href=&quot;http://www.crazytribe.net&quot; <wbr></wbr>title=&quot;打开狂人部落的首页&quot;&gt;狂人部落<wbr></wbr><br />图像<img src="undefined" /><wbr></wbr>语法格式:<br />&lt;img <wbr></wbr>src=&quot;url&quot; <wbr></wbr>alt=&quot;?&quot; <wbr></wbr>width=&quot;?&quot; <wbr></wbr>height=&quot;?&quot; <wbr></wbr>border=&quot;?&quot; <wbr></wbr>align=&quot;?&quot;&gt;<wbr></wbr><br />border属性定义图片边框的宽度,默认值为0 <wbr></wbr><br />align属性设置图片旁边文字的位置 <wbr></wbr><br />语法格式:&lt;img <wbr></wbr>src=&quot;&quot; <wbr></wbr>align&quot;&quot;&gt;<wbr></wbr><br />可选值有: <wbr></wbr><br />top图片和文字顶部对齐 <wbr></wbr><br />middle图片和文字居中对齐 <wbr></wbr><br />bottom图片和文字底边对齐(默认) <wbr></wbr><br />left图片居左对齐,文字沿图片绕排 <wbr></wbr><br />right图片居右对齐,文字沿图片绕排 <wbr></wbr><br />absmiddle图片对齐到目前文字行绝对中央 <wbr></wbr><br />absbottom图片对齐到目前文字行绝对底部 <wbr></wbr><br />文字的排版 <wbr></wbr><br />不换行空白标记 <wbr></wbr><br />font元素 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;font <wbr></wbr>face=&quot;字体名称&quot; <wbr></wbr>size=&quot;字体大小&quot; <wbr></wbr>color=&quot;字体颜色&quot;&gt;<wbr></wbr><br />字体大小可选值为1——7,默认为3 <wbr></wbr><br />例:〈font <wbr></wbr>face=&quot;黑体&quot; <wbr></wbr>size=&quot;4&quot; <wbr></wbr>color=&quot;#ff00ff&quot;&gt;....<wbr></wbr><br />水平线<hr /><wbr></wbr><br />语法格式:&lt;hr <wbr></wbr>width=&quot;宽度&quot; <wbr></wbr>align=&quot;对齐方式默认居中center&quot; <wbr></wbr>size=&quot;水平线厚度默认为2&quot; <wbr></wbr>color=&quot;颜色&quot; <wbr></wbr>noshade&gt;<wbr></wbr><br />noshade无阴影,既实线 <wbr></wbr><br />层〈div&gt;两种元素 <wbr></wbr><br /><div>是块级元素,和段落元素<p>相似,不同的是两个<div>元素之间不会产生两个<p>元素之间的空行, <wbr></wbr><br />是行内元素,可以定义段落中部分文字的属性 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;div <wbr></wbr>align=&quot;&quot; <wbr></wbr>&gt;...</p></div><wbr></wbr><br />align设置层中元素的水平对齐方式 <wbr></wbr><br />stule设置元素应用css规范的属性 <wbr></wbr><br /><div>兼容性比要好一点,最好使用<div><wbr></wbr><br />表格语法格式: <wbr></wbr><br />&lt;table <wbr></wbr>width=&quot;&quot; <wbr></wbr>bgcolor=&quot;&quot; <wbr></wbr>background=&quot;&quot; <wbr></wbr>border=&quot;&quot; <wbr></wbr>cellspacing=&quot;&quot; <wbr></wbr>cellpadding=&quot;&quot;&gt;<wbr></wbr><br /><table><tbody><tr></tr></tbody></table>...<table><tbody><tr><td>....</td></tr></tbody></table>....<table><tbody><tr></tr><wbr></wbr><br /></tbody></table><wbr></wbr><br />border边框宽度默认值为0,既没有边框 <wbr></wbr><br />cellspacing表格中单元格的边距大小,默认值为两个像素 <wbr></wbr><br />cellpadding表格中单元格之间的间距大小,默认值为两个像素 <wbr></wbr><br />tr元素 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;tr <wbr></wbr>align=&quot;&quot; <wbr></wbr>bgcolor=&quot;&quot;&gt;....<table><tbody><tr></tr><wbr></wbr><br /></tbody></table>align属性对齐方式可选值如下:left,center,tight,默认为left <wbr></wbr><br />bgcolor指定该行的背景颜色 <wbr></wbr><br />td元素 <wbr></wbr><br />语法格式: <wbr></wbr><br />&lt;td <wbr></wbr>width=&quot;宽度&quot; <wbr></wbr>height=&quot;高度&quot; <wbr></wbr>align=&quot;水平对齐方式&quot; <wbr></wbr>valign=&quot;垂直对齐方式&quot; <wbr></wbr>bgcolor=&quot;&quot; <wbr></wbr>background=&quot;&quot; <wbr></wbr>rowspan=&quot;单元格的行跨度&quot; <wbr></wbr>colapan=&quot;单元格的列跨度&quot;&gt;.....<table><tbody><tr><td></td><wbr></wbr><br /></tr></tbody></table>align属性的可选值有:left,center,right <wbr></wbr><br />valign属性的可选值有:top,middle,bottom <wbr></wbr><br />rowspan和colapan跨行和跨列的数量,默认为1 <wbr></wbr><br />input元素 <wbr></wbr>语法格式:<br />&lt;input <wbr></wbr>type=&quot;&quot;&gt;<wbr></wbr><br />type属性的可选值有: <wbr></wbr><br />text <wbr></wbr>单行文本框 <wbr></wbr><br />属性:name <wbr></wbr>文本框名称 <wbr></wbr><br />value <wbr></wbr>文本框的初始值 <wbr></wbr><br />size <wbr></wbr>文本框的长度 <wbr></wbr><br />maxlength <wbr></wbr>可输入字符串最大的长度 <wbr></wbr><br />radio <wbr></wbr>单选框 <wbr></wbr><br />属性:name <wbr></wbr>单选框名称 <wbr></wbr><br />value <wbr></wbr>内部值 <wbr></wbr><br />checked <wbr></wbr>默认选定 <wbr></wbr><br />checkbox <wbr></wbr>复选框 <wbr></wbr><br />属性:name <wbr></wbr>复选框名称 <wbr></wbr><br />value <wbr></wbr>内部值 <wbr></wbr><br />checked <wbr></wbr>默认选定 <wbr></wbr><br />reset <wbr></wbr>重置按钮 <wbr></wbr><br />submit <wbr></wbr>确定按钮 <wbr></wbr><br />属性:name <wbr></wbr>按钮名称 <wbr></wbr><br />value <wbr></wbr>显示在按钮上的文字 <wbr></wbr><br />password <wbr></wbr>密码框 <wbr></wbr><br />属性与文本框的属性完全相同 <wbr></wbr><br />file <wbr></wbr>文件域 <wbr></wbr><br />属性:name文件域名称 <wbr></wbr><br />size <wbr></wbr>文件域的长度 <wbr></wbr><br />maxlength <wbr></wbr>文件域可接受的字符数量的上限 <wbr></wbr><br />hidden <wbr></wbr>隐藏域 <wbr></wbr><br />属性:name <wbr></wbr>隐藏域名称 <wbr></wbr><br />value <wbr></wbr>内定值 <wbr></wbr><br />image <wbr></wbr>图片域 <wbr></wbr><br />属性:name <wbr></wbr>所要代表的按钮,可以是submit,reset,或其他. <wbr></wbr><br />src <wbr></wbr>按钮图片的url <wbr></wbr>地址 <wbr></wbr><br />列表框<select><wbr></wbr><br /></select>语法格式: <wbr></wbr><br /><select><wbr></wbr><br /></select>..... <wbr></wbr><br /><select><option>....</option><wbr></wbr><br /></select>..... <wbr></wbr><br /></div></div></p></div></dd></dl></dt></dl></dd></dl></option></select><wbr></wbr><br />select元素 <wbr></wbr><br />语法格式:&lt;select <wbr></wbr>name=&quot;&quot; <wbr></wbr>size=&quot;&quot;multiple&gt;<select><option></option></select><wbr></wbr><br />name <wbr></wbr>指定列表框的名字 <wbr></wbr><br />size <wbr></wbr>指定列表框显示列表项的条数,如果指定了该参数,select元素是个列表,否则是一个下拉列表框 <wbr></wbr><br />multiple <wbr></wbr>指定了这个参数,则表示该列表框可选择多项,否则只可选择一项 <wbr></wbr><br />option属性 <wbr></wbr><br />语法格式:&lt;option <wbr></wbr>value=&quot;&quot; <wbr></wbr>selected&gt;<select><option></option><wbr></wbr><br /></select>value <wbr></wbr>该列表项的值 <wbr></wbr><br />selected <wbr></wbr>如果设定了这个参数,默认为选定这一项 <wbr></wbr><br />多行文本框<textarea><wbr></wbr><br /><textarea <wbr></wbr>name="" <wbr></wbr>cols="" <wbr></wbr>rows="" <wbr></wbr>wrap="off/physical/virtual"></textarea><wbr></wbr><br />属性: <wbr></wbr><br />name文本框的名称 <wbr></wbr><br />cols文本框的宽度 <wbr></wbr><br />rows文本框的高度 <wbr></wbr><br />wrap文本框的折行方式可选值有: <wbr></wbr><br />off不保存换行信息 <wbr></wbr><br />physical强迫浏览器在发送信息到web服务器端时必须将多行文本框的文字一行一行的送出, <wbr></wbr><br />virtual送出连续成串的字除非使用者按回车。 <wbr></wbr><br />css <wbr></wbr>层叠样式表 <wbr></wbr><br />引入层叠样式表的方法包括: <wbr></wbr><br />外联式样式表 <wbr></wbr><br />例:<head><wbr></wbr><br /></head>&lt;link <wbr></wbr>rel=&quot;stylesheet&quot; <wbr></wbr>href=&quot;/css/default.css&quot;&gt;<wbr></wbr><br /><head></head><wbr></wbr><br /><body><wbr></wbr><br />.... <wbr></wbr><br /></body><wbr></wbr><br /><html></html><wbr></wbr><br />属性:rel <wbr></wbr>用来说明<link />元素在这里要完成的任务是连接一个独立的css文件。而href属性给出了所要连接css文件的url地址 <wbr></wbr><br />内嵌式样式表: <wbr></wbr><br />例:<html><wbr></wbr><br /><head><wbr></wbr><br /></head></html>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> td{font:9pt;color:red} <wbr /><br /> .font105{font:10.5pt;color:blue} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br /><body>....</body><wbr></wbr><br /><html></html><wbr></wbr><br />元素内定 <wbr></wbr><br />格式:&lt;p <wbr></wbr>style=&quot;font-size:10.5pt&quot;&gt;<wbr></wbr><br />导入式样式表 <wbr></wbr><br />〈html&gt;<wbr></wbr><br /><head><wbr></wbr><br /></head>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> @import <wbr />url(css/home.css); <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><body><wbr></wbr><br />.... <wbr></wbr><br /></body><wbr></wbr><br /><html></html><wbr></wbr><br />css的优先级 <wbr></wbr><br />越接近目标的样式定义优先级越高,高优先级样式将继承低优先级样式的未重叠定义但覆盖重叠的定义 <wbr></wbr><br />如果4种样式表对同一元素定义了不同的样式,那么他们的优先级顺序从高到低是,元素内定,内嵌样式表,导入样式表,外联样式表。 <wbr></wbr><br />css结构 <wbr></wbr><br />例:td{font-size:10.5pt;color:#666666} <wbr></wbr><br />css样式包含两个基础部分, <wbr></wbr><br />选择符<table><tbody><tr><td>和声明{font-size:10.5pt;color:#666666} <wbr></wbr><br />声明也有两部分组成: <wbr></wbr><br />属性font-size,color和值10.5pt,#666666 <wbr></wbr><br />选择符分为6种 <wbr></wbr><br />1元素选择符 <wbr></wbr><br />当页面上多个元素的样式相同时,可以将多个元素放在一起定义,中间以逗号分开 <wbr></wbr>例:td,p,li,input,select{font-size:12px;} <wbr></wbr><br />2class(类)选择符 <wbr></wbr><br />例:〈head&gt;<wbr></wbr><br /><title>.....</title><wbr></wbr><br />&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> .red{font-size:10.5pt;color:#ff0000} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br />&lt;body <wbr></wbr>bgcolor=&quot;#ffffff&quot;&gt;<wbr></wbr><br />&lt;p <wbr></wbr>class=&quot;red&quot;&gt;士大夫井冈山地方官</td></tr></tbody></table></noframe></multiple></marquee></em></h6></h1></em></dt></dl></dd></dl></cite></cite></center></body></blink></big></strong></frameset></!></!></!><!></!><wbr></wbr><br /><p>九连环离开计划</p><wbr></wbr><br /><body></body><wbr></wbr><br />还有一种方法就是限定可以应用它的页面元素 <wbr></wbr><br />例:〈head&gt;<wbr></wbr><br /><title>.....</title><wbr></wbr><br />&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> h1.red{color:#ff0000} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br />&lt;body <wbr></wbr>bgcolor=&quot;#ffffff&quot;&gt;<wbr></wbr><br />&lt;p <wbr></wbr>class=&quot;red&quot;&gt;士大夫井冈山地方官<wbr></wbr><br />&lt;h1 <wbr></wbr>class=&quot;red&quot;&gt;九连环离开计划<h1></h1><wbr></wbr><br /><body></body><wbr></wbr><br />3 <wbr></wbr>id选择符 <wbr></wbr><br />与class选择附类似,只是把&#39;.&#39;换成&#39;#&#39; <wbr></wbr><br />例:<body><wbr></wbr><br /><head><wbr></wbr><br /></head>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> #select{font-size:18px;color:#0000ff} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br /><body><wbr></wbr><br />&lt;table <wbr></wbr>width=&quot;250&quot; <wbr></wbr>border=&quot;1&quot; <wbr></wbr>height=&quot;50&quot;&gt;<wbr></wbr><br /><table><tbody><tr><wbr></wbr><br /></tr></tbody></table>&lt;td <wbr></wbr>align=&quot;center&quot; <wbr></wbr>id=&quot;select&quot;&gt;id选择符<table><tbody><tr><td></td><wbr></wbr><br /></tr><wbr></wbr><br /></tbody></table><wbr></wbr><br /></body><wbr></wbr><br /><html></html><wbr></wbr><br />我们看到在调用ID选择附时与CLASS选择附类似,只是将class=&quot;&quot;换成了id=&quot;&quot;,方便页面脚本语言的调用 <wbr></wbr><br />关联选择符 <wbr></wbr><br /><body><wbr></wbr><br /><head><wbr></wbr><br /></head>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> td <wbr />p{font-size:18px;color:#0000ff} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br /><body><wbr></wbr><br />&lt;table <wbr></wbr>width=&quot;250&quot; <wbr></wbr>border=&quot;1&quot; <wbr></wbr>height=&quot;50&quot;&gt;<wbr></wbr><br /><table><tbody><tr><wbr></wbr><br /></tr></tbody></table>&lt;td <wbr></wbr>align=&quot;center&quot;&gt;<p>关联选择符</p><table><tbody><tr><td></td><wbr></wbr><br /></tr><wbr></wbr><br /></tbody></table><wbr></wbr><br /><p>关联选择符</p><wbr></wbr><br /></body><wbr></wbr><br /><html></html><wbr></wbr><br />我们设定了在元素中<table><tbody><tr><td>的元素<p>所包含文字的样式,只有在两个条件都满足是,样式在会起作用, <wbr></wbr><br />伪类选择符 <wbr></wbr><br />是只能用在css选择符里,而不能用在html代码中的选择符 <wbr></wbr><br />例: <wbr></wbr><br />〈html&gt;<wbr></wbr><br /><head><wbr></wbr><br /></head>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> a:link{color:#000000} <wbr /><br /> a:visited{color:#cccccc} <wbr /><br /> a:hover{color:#ff0000} <wbr /><br /> a:active{color:#ooooff} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><head></head><wbr></wbr><br /><body><wbr></wbr><br /><p>&lt;a <wbr></wbr>href=&quot;#&quot;&gt;关联选择符<p><wbr></wbr><br /><p>&lt;a <wbr></wbr>href=&quot;#&quot;&gt;关联选择符<p><wbr></wbr><br /><p>&lt;a <wbr></wbr>href=&quot;#&quot;&gt;关联选择符<p><wbr></wbr><br /><p>&lt;a <wbr></wbr>href=&quot;#&quot;&gt;关联选择符<p><wbr></wbr><br />〈/body&gt;<wbr></wbr><br /><html></html><wbr></wbr><br />正确的顺序是a:link\a:visited\a:hover否则会引起页面上连接颜色混乱 <wbr></wbr><br />伪元素选择符 <wbr></wbr><br />与伪类选择符定义类似,目前被大多数浏览器支持的有两个:首行伪元素(first-line)和首字符伪元素(first-letter)是用来实现首行大写和首行下沉效果的 <wbr></wbr><br />例:首行 <wbr></wbr><br /><html><wbr></wbr><br /><head><wbr></wbr><br /><style _ue_org_tagname="style"><wbr /><br /><!-- <wbr /><br /> p:first-line{color:red;font-size:20pt} <wbr /><br /> --><wbr /><br /></style><wbr></wbr><br /><hesd></hesd><wbr></wbr><br /><body><wbr></wbr><br /><p>dfgsadfgsdfgsdfgsdfgsdfg<wbr></wbr>sdfgsdfgsdfgsdfgsdf...</p><wbr></wbr><br /></body><wbr></wbr><br /></head></html><wbr></wbr><br />长度随浏览器窗口大小而改变 <wbr></wbr><br />首字 <wbr></wbr><br /><html><wbr></wbr><br /><head><wbr></wbr><br /><style _ue_org_tagname="style"><wbr /><br /><!-- <wbr /><br /> p:first-letter{color:red;font-size:50pt;float:left;} <wbr /><br /> --><wbr /><br /></style><wbr></wbr><br /><hesd></hesd><wbr></wbr><br /><body><wbr></wbr><br /><p>dfgsadfgsdfgsdfgsdfgsdfg<wbr></wbr>sdfgsdfgsdfgsdfgsdf...</p><wbr></wbr><br /></body><wbr></wbr><br /></head></html><wbr></wbr><br />以上两种都只能应用于块状元素上 <wbr></wbr><br />css规则 <wbr></wbr><br />1.继承 <wbr></wbr><br />例:<html><wbr></wbr><br /><head><wbr></wbr><br /></head></html>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> td{font-size:12pt} <wbr /><br /> p{color:red} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><hesd></hesd><wbr></wbr><br /><body><wbr></wbr><br />&lt;table <wbr></wbr>width=&quot;300&quot; <wbr></wbr>border=&quot;1&quot; <wbr></wbr>height=&quot;150&quot;&gt;<wbr></wbr><br /><table><tbody><tr><wbr></wbr><br /></tr></tbody></table>&lt;td <wbr></wbr>align=&quot;center&quot;&gt;<wbr></wbr><br /><p>css规则</p><wbr></wbr><br /></body></p></p></p></p></p></p></p></p></body></p></td><wbr></wbr><br /></tr></tbody></table><wbr></wbr><br /></body><wbr></wbr><br /><html></html><wbr></wbr><br /><p>为最高级<table><tbody><tr><td>次一级两种css用在一个属性元素上,相同的覆盖,不同的继承, <wbr></wbr><br />2.组合 <wbr></wbr><br />例:td{font-size:12pt} <wbr></wbr><br />p1{font-size:12pt} <wbr></wbr><br />组合后 <wbr></wbr><br />td,.p1{font-size:12pt} <wbr></wbr><br />3.层叠 <wbr></wbr><br />在样式里定义过后,在表格属性中又定义一次 <wbr></wbr><br /><html><wbr></wbr><br /><head><wbr></wbr><br /></head></html>&lt;style <wbr></wbr>type=&quot;text/css&quot;&gt;<wbr></wbr><br /><!-- <wbr /><br /> red{color:#ff0000 <wbr />limportant} <wbr /><br /> --><wbr></wbr><br /><style _ue_org_tagname="style"></style><wbr></wbr><br /><hesd></hesd><wbr></wbr><br /><body><wbr></wbr><br />&lt;table <wbr></wbr>width=&quot;300&quot; <wbr></wbr>border=&quot;1&quot; <wbr></wbr>height=&quot;150&quot;&gt;<wbr></wbr><br /><table><tbody><tr><wbr></wbr><br /></tr></tbody></table>&lt;td <wbr></wbr>align=&quot;center&quot; <wbr></wbr>style=&quot;color:#0000ff&quot; <wbr></wbr>class=&quot;red&quot;&gt;决撒地方官</body></td><wbr></wbr><br /></tr><wbr></wbr><br /></tbody></table><wbr></wbr><br /></p></body><wbr></wbr><br /><html></html><wbr></wbr><br />css单位 <wbr></wbr><br />分四大类: <wbr></wbr><br />1 <wbr></wbr>长度单位 <wbr></wbr><br />数值可以是整数,小数,正数,负数,0,后加单位(负值不要轻易使用) <wbr></wbr><br />换算关系: <wbr></wbr><br />1in(英寸)=6pc(派) <wbr></wbr><br />1in(英寸)=72pt(磅) <wbr></wbr><br />1in(英寸)=2.54(厘米) <wbr></wbr><br />1cm(厘米)=10mm(毫米) <wbr></wbr><br />1cm(厘米)=0.3937(英寸) <wbr></wbr><br />1pt(磅)=1/72in(英寸)=0.2478mm(毫米) <wbr></wbr><br />1pc(派)=1/6in(英寸)=我国新四号铅字的尺寸 <wbr></wbr><br />2 <wbr></wbr>百分比单位 <wbr></wbr><br />3 <wbr></wbr>颜色单位 <wbr></wbr><br />4 <wbr></wbr>url单位<br />div属性<br />color <wbr></wbr>: <wbr></wbr>#999999 <wbr></wbr><wbr></wbr><wbr></wbr>文字颜色 <wbr></wbr><br />font-family <wbr></wbr>: <wbr></wbr>宋体 <wbr></wbr>文字字型 <wbr></wbr><br />font-size <wbr></wbr>: <wbr></wbr>10pt <wbr></wbr>文字大小 <wbr></wbr><br />font-style:itelic <wbr></wbr>文字斜体育<br />font-variant:small-caps <wbr></wbr>小字体<br />letter-spacing <wbr></wbr>: <wbr></wbr>1pt <wbr></wbr>文字间距<br />line-height <wbr></wbr>: <wbr></wbr>200% <wbr></wbr>设定行高<br />font-weight:bold <wbr></wbr>文字粗体<br />vertical-align:sub <wbr></wbr>下标字<br />vertical-align:super <wbr></wbr>上标字<br />text-decoration:line-through <wbr></wbr>加?h除线<br />text-decoration:overline <wbr></wbr>加顶线<br />text-decoration:underline <wbr></wbr>加底线<br />text-decoration:none <wbr></wbr>?h除连接底线<br />text-transform <wbr></wbr>: <wbr></wbr>capitalize <wbr></wbr>首字大写<br />text-transform <wbr></wbr>: <wbr></wbr>uppercase <wbr></wbr>英文大写<br />text-transform <wbr></wbr>: <wbr></wbr>lowercase <wbr></wbr>英文写<br />text-align:right <wbr></wbr>文字*右对齐<br />text-align:left <wbr></wbr>文字*左对齐<br />text-align:center <wbr></wbr>文字置中对齐 <wbr></wbr><br />这些是一些简单的文字效果,可以应用到css的页面中。 <br />背景<br />background-color:black <wbr></wbr>背景颜色 <wbr></wbr><br />background-image <wbr></wbr>: <wbr></wbr>url(image/bg.gif) <wbr></wbr>背景图片<br />background-attachment <wbr></wbr>: <wbr></wbr>fixed <wbr></wbr>固定背景<br />background-repeat <wbr></wbr>: <wbr></wbr>repeat <wbr></wbr>重复排列-网页预设<br />background-repeat <wbr></wbr>: <wbr></wbr>no-repeat <wbr></wbr>不重复排列<br />background-repeat <wbr></wbr>: <wbr></wbr>repeat-x <wbr></wbr>在x轴重复排列<br />background-repeat <wbr></wbr>: <wbr></wbr>repeat-y <wbr></wbr>在y轴重复排列<br />background-position <wbr></wbr>: <wbr></wbr>90% <wbr></wbr>90% <wbr></wbr>背景图片x与y轴的位置 <wbr></wbr><br />链接<br />A <wbr></wbr>所有超连接<br />A:link <wbr></wbr>超连接文字格式 <wbr></wbr><br />A:visited <wbr></wbr>浏览过的连接文字格式 <wbr></wbr><br />A:active <wbr></wbr>按下连接的格式 <wbr></wbr><br />A:hover <wbr></wbr>鼠标移至连接<br />边框<br />border-top <wbr></wbr>: <wbr></wbr>1px <wbr></wbr>solid <wbr></wbr>black <wbr></wbr>上框 <wbr></wbr><br />border-bottom <wbr></wbr>: <wbr></wbr>1px <wbr></wbr>solid <wbr></wbr>#6699cc <wbr></wbr>下框 <wbr></wbr><br />border-left <wbr></wbr>: <wbr></wbr>1px <wbr></wbr>solid <wbr></wbr>#6699cc <wbr></wbr>左框 <wbr></wbr><br />border-right <wbr></wbr>: <wbr></wbr>1px <wbr></wbr>solid <wbr></wbr>#6699cc <wbr></wbr>右框<br />border: <wbr></wbr>1px <wbr></wbr>solid <wbr></wbr>#6699cc <wbr></wbr>四边框<br />虚线<br />&lt;TEXTAREA <wbr></wbr>STYLE=&quot;border:1px <wbr></wbr>dashed <wbr></wbr>pink&quot;&gt;<br />实线<br />&lt;TEXTAREA <wbr></wbr>STYLE=&quot;border:1px <wbr></wbr>solid <wbr></wbr>pink&quot;&gt;<plaintext></plaintext></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></p> </div> <div class="update_page clearfix"> <div class="pagelist f-tit"> </div> </div> </div> <div class="tag">Tag:<a href="/tag/html_75_1.html" target="_blank" class="hot-tag">html</a><a href="/tag/biaoqian_169_1.html" target="_blank" class="hot-tag">标签</a><a href="/tag/shuxing_170_1.html" target="_blank" class="hot-tag">属性</a><a href="/tag/ziti_171_1.html" target="_blank" class="hot-tag">字体</a> </div> <div class="share"> <!-- Baidu Button BEGIN --> <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare"> <span class="bds_more">分享是不自私的表现:</span> <a class="bds_bdhome">百度新首页</a> <a class="bds_tsina">新浪微博</a> <a class="bds_tqq">腾讯微博</a> <a class="bds_baidu">百度搜藏</a> <a class="bds_douban">豆瓣网</a> <a class="bds_renren">人人网</a> <a class="shareCount"></a> <a class="bds_copy">复制网址</a> </div> <script type="text/javascript" id="bdshare_js" data="type=tools&uid=89860593" ></script> <script type="text/javascript" id="bdshell_js"></script> <script type="text/javascript"> document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000); </script> <!-- Baidu Button END --> </div> <div class="bot"> <dl> <dt>分享到:</dt> <dd><a target="_blank" href="http://v.t.sina.com.cn/share/share.php?title=html标签属性收藏大全&url=https://www.xuejiqiao.com/jiaocheng/201390.html &pic=&searchPic=false"><img src="/statics/images/article_img3.jpg"></a></dd> <dd><a target="_blank" href="http://v.t.qq.com/share/share.php?title=html标签属性收藏大全&url=https://www.xuejiqiao.com/jiaocheng/201390.html &pic="><img src="/statics/images/article_img4.jpg"></a></dd> <dd><a target="_blank" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?site=baidu.mylikesz.com&title=&desc=html标签属性收藏大全&summary=&url=https://www.xuejiqiao.com/jiaocheng/201390.html &pics="><img src="/statics/images/article_img6.jpg"></a></dd> <dd><a onmouseout="$('.code2dimlayer').hide();" onmouseover="$('.code2dimlayer').show();" href="javascript:;" id="test456"><img id="ewmpic0" src="/statics/images/article_img5.jpg"></a></dd> </dl> <ul class="wzul"><script src="https://www.xuejiqiao.com/qrcode/?aid=90" language="javascript"></script> <li> <p>用微信  “扫一扫”</p> <p>将文章分享到朋友圈。</p> <p>关注公众号:xue-jiqiao</p> </li> </ul> </div> <div class="info2"> <p style="color:#c90000;">本文版权归原作者所有,转载请注明原文来源出处,学技巧网站制作感谢您的支持!<script src="https://www.xuejiqiao.com/statics/js/qqqun.js" type="text/javascript"></script></p> </div> <div class="related"> <ul class="relatedList clearfix"> <li>上一篇:<a href='https://www.xuejiqiao.com/jiaocheng/201389.html'>表单交互实现效果</a> </li> <li>下一篇:<a href='https://www.xuejiqiao.com/jiaocheng/201391.html'>div+css设计中ID的命名习惯和规范</a> </li> </ul> </div> <div class="related"> <h4><em class="xg-icon"></em>相关Div+Css教程</h4> <div class="xg mt15 clearfix"> <div class="xg_list"> <ul> <li><a title="用CSS控制图片自适应大小代码" href="https://www.xuejiqiao.com/jiaocheng/2014787.html">用CSS控制图片自适应大小代码</a></li> <li><a title="常用CSS简写指南,标准规范的写法" href="https://www.xuejiqiao.com/jiaocheng/2014731.html">常用CSS简写指南,标准规范的写法</a></li> <li><a title="CSS3实用技巧:几行代码实现图片黑白效果" href="https://www.xuejiqiao.com/jiaocheng/2014725.html">CSS3实用技巧:几行代码实现图片黑</a></li> <li><a title="html5+CSS3实现的炫酷超链接特效" href="https://www.xuejiqiao.com/jiaocheng/2014724.html">html5+CSS3实现的炫酷超链接特效</a></li> <li><a title="CSS3编写的瀑布流代码 不用js即可实现" href="https://www.xuejiqiao.com/jiaocheng/2014655.html">CSS3编写的瀑布流代码 不用js即可实</a></li> <li><a title="IE8中GBK2312转UTF-8乱码及解决方案" href="https://www.xuejiqiao.com/jiaocheng/2014651.html">IE8中GBK2312转UTF-8乱码及解决方案</a></li> <li><a title="html中前端设计常用Javascript语句" href="https://www.xuejiqiao.com/jiaocheng/2014647.html">html中前端设计常用Javascript语句</a></li> <li><a title="CSS教程:a标签的样式规划" href="https://www.xuejiqiao.com/jiaocheng/2014476.html">CSS教程:a标签的样式规划</a></li> <li><a title="css怎么定义让图片全屏显示" href="https://www.xuejiqiao.com/jiaocheng/2014435.html">css怎么定义让图片全屏显示</a></li> <li><a title="CSS中如何实现图片垂直居中" href="https://www.xuejiqiao.com/jiaocheng/2014428.html">CSS中如何实现图片垂直居中</a></li> <li><a title="针对CSS新手整理的CSS技巧" href="https://www.xuejiqiao.com/jiaocheng/2014427.html">针对CSS新手整理的CSS技巧</a></li> <li><a title="div+css设计中ID的命名习惯和规范" href="https://www.xuejiqiao.com/jiaocheng/2014374.html">div+css设计中ID的命名习惯和规范</a></li> </ul></div> </div> </div> <div class="m_T12" id="link">发表评论:</div> <div class="m_Box19"><!-- Duoshuo Comment BEGIN --> <div class="ds-thread"></div> <!-- Duoshuo Comment END --></div> <div class="pinglun"> <script src='/plus/ad_js.php?aid=10043' language='javascript'></script> </div> </div><!--main-left--> <div class="main-right"> <div class="c_box png_box"> <div class="jsrt jsrt1"><span class="t_left">Div+Css教程</span> <span class="t_left jsrrt">详细 - 全面 - 教程</span> </div> <ul class="clearfix sort-nav"> <li> <a href='https://www.xuejiqiao.com/jiaocheng/dedecmsjiaocheng/'>dedeCMS教程</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/phpcmsjiaocheng/'>phpcms教程</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/diguojiaocheng/'>帝国Cms教程</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/zimeiti/'>自媒体</a></li> <li><a href='https://www.xuejiqiao.com/jiaocheng/divcss/' class='thisclass'>Div+Css教程</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/seo/'>优化技巧</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/php/'>PHP编程教程</a></li> <li> <a href='https://www.xuejiqiao.com/jiaocheng/fuwuqi/'>服务器教程</a></li> </ul> </div> <div class="hd b-hd mt15"><em class="icon-rank"></em>最新Div+Css教程</div> <div class="r-box"> <ul class="new-list num-list"> <li><em class="n6 n2">1</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014787.html">用CSS控制图片自适应大小代码</a></li> <li><em class="n6 n2">2</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014731.html">常用CSS简写指南,标准规范的写法</a></li> <li><em class="n6 n2">3</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014725.html">CSS3实用技巧:几行代码实现图片黑</a></li> <li><em class="n6 n2">4</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014724.html">html5+CSS3实现的炫酷超链接特效</a></li> <li><em class="n6 n2">5</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014655.html">CSS3编写的瀑布流代码 不用js即可实</a></li> <li><em class="n6 n2">6</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014651.html">IE8中GBK2312转UTF-8乱码及解决方案</a></li> <li><em class="n6 n2">7</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014647.html">html中前端设计常用Javascript语句</a></li> <li><em class="n6 n2">8</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014476.html">CSS教程:a标签的样式规划</a></li> <li><em class="n6 n2">9</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014435.html">css怎么定义让图片全屏显示</a></li> <li><em class="n6 n2">10</em> <a target="_blank" href="https://www.xuejiqiao.com/jiaocheng/2014428.html">CSS中如何实现图片垂直居中</a></li> </ul> </div> <div class="right-ad"> </div> <div class="hd b-hd mt15"><em class="icon-rank"></em>猜你也喜欢看这些</div> <div class="r-box"> <ul class="rank-comments-list"> <li> <div class="img-box"><a href="https://www.xuejiqiao.com/cmsmuban/2014441.html"><img src='https://www.xuejiqiao.com/uploads/140604/1-140604130G3196.jpg' border='0' width='190' height='130' alt="最新dedecms网页游戏开服表发号网站"></a></div> <div class="boxc"> <h4><a target="_blank" href="https://www.xuejiqiao.com/cmsmuban/2014441.html">最新dedecms网页游戏开服表发号网站</a></h4> <p class="js-hm">栏目:<a href='https://www.xuejiqiao.com/cmsmuban/dedecms/'>织梦模板</a></p> <p><time>2014-06-04 12:59:54</time></p> </div> </li> <li> <div class="img-box"><a href="https://www.xuejiqiao.com/cmsmuban/2014402.html"><img src='https://www.xuejiqiao.com/uploads/140508/1-14050Q54R3H8.jpg' border='0' width='190' height='130' alt="织梦HTML5网络公司蓝色网站模板"></a></div> <div class="boxc"> <h4><a target="_blank" href="https://www.xuejiqiao.com/cmsmuban/2014402.html">织梦HTML5网络公司蓝色网站模板</a></h4> <p class="js-hm">栏目:<a href='https://www.xuejiqiao.com/cmsmuban/dedecms/'>织梦模板</a></p> <p><time>2014-05-01 15:33:47</time></p> </div> </li> <li> <div class="img-box"><a href="https://www.xuejiqiao.com/cmsmuban/2014775.html"><img src='https://www.xuejiqiao.com/uploads/image/20141011/14130077328358.jpg' border='0' width='190' height='130' alt="笑话网站源码织梦模板带有全站数"></a></div> <div class="boxc"> <h4><a target="_blank" href="https://www.xuejiqiao.com/cmsmuban/2014775.html">笑话网站源码织梦模板带有全站数</a></h4> <p class="js-hm">栏目:<a href='https://www.xuejiqiao.com/cmsmuban/dedecms/'>织梦模板</a></p> <p><time>2014-10-10 16:19:05</time></p> </div> </li> <li> <div class="img-box"><a href="https://www.xuejiqiao.com/cmsmuban/2014438.html"><img src='https://www.xuejiqiao.com/uploads/140530/1-140530163TRL.jpg' border='0' width='190' height='130' alt="PHP网站分类目录程序dedecms二次开发"></a></div> <div class="boxc"> <h4><a target="_blank" href="https://www.xuejiqiao.com/cmsmuban/2014438.html">PHP网站分类目录程序dedecms二次开发</a></h4> <p class="js-hm">栏目:<a href='https://www.xuejiqiao.com/cmsmuban/dedecms/'>织梦模板</a></p> <p><time>2014-05-30 16:23:23</time></p> </div> </li> </ul> </div> <div class="right-ad"><!--AD--></div> </div><!--main-update--> </div><!--xuejiqiao--> </div> <div class="Footer"> <div class="f_Grid1"> <p> <a href="https://www.xuejiqiao.com/index/guest.html" target="_blank">联系我们</a>| <a href="https://www.xuejiqiao.com/index/about.html" target="_blank">关于我们</a>| <a href="https://www.xuejiqiao.com/index/copyright.html" target="_blank">版权声明</a>| <a href="https://www.xuejiqiao.com/index/guest.html" target="_blank">帮助中心</a>| <a href="https://www.xuejiqiao.com/mubandingzhi/" target="_blank">模板定制</a>| <a href="https://www.xuejiqiao.com/baidumap.xml" target="_blank">百度新闻</a>| <a href="https://www.xuejiqiao.com/index/map.html" target="_blank">网站地图</a>|<a href="https://www.xuejiqiao.com/sitemap.html" target="_blank">百度地图</a>| <script type="text/javascript" src="/statics/js/tongji.js"></script></p> <p><span>声明:</span>本站所有模板/文章除标明原创外,均来自网络转载,版权归原作者所有,如果有侵犯到您的权益,请联系本站删除,谢谢合作!</p> <p>本站专业提供网站模板,网页模板,CMS模板,模板教程,网站制作,程序插件,织梦模板等建站模板,教程等最专业的建站资源,打造专业的Web交流平台!</p> <div class="clear"></div> </div> <div class="f_Grid2"> Copyright © 2013-2014 <a href="https://www.xuejiqiao.com/">学技巧网站制作</a> All Rights Reserved. www.xuejiqiao.com | <a href="http://www.miibeian.gov.cn/" target="_blank" rel="nofollow">京ICP备13040875号-1</a></div> </div><div style="display:none;" class="back-to" id="toolBackTop"><a title="返回顶部" onclick="window.scrollTo(0,0);return false;" href="#top" class="back-top">返回顶部</a></div> </body> </html>