CSS 表格属性

html-css018

CSS 表格属性,第1张

CSS表格属性用于设置HTML表格的样式,HTML表格由 <table></table> 标签嵌套 <tbody>, <tr>, <td>等标签组成,一个HTML表格默认至少包含table,tbody,tr,td四个元素。

CSS表格属性:

显示表格边框有时候特别重要,它能让表格结构更清晰。

默认的表格有双边框,这是因为表和th/ td元素有独立的边界。border-collapse 属性设置表格的边框是否被折叠成一个单一的边框或隔开。

<html>

<head>

<style type="text/css">

a.top:link {font-family: 宋体} /*链接字体*/

a.top:link {font-weight: normal} /*设置链接文字中的字符粗细*/

a.top:link {font-size: 12} /*设置链接文字的大小*/

a.top:link {text-decoration: none} /*设置链接文字没有下划线*/

a.top:hover {text-decoration: underline} /*鼠标放在链接上时有下划线*/

a.top:link {color: #000000} /*设置链接文字的颜色*/

a.top:visited {color: #000000} /*访问过的链接*/

a.top:hover {color: #B50000} /*鼠标放在链接上字体的颜色*/

a.tj:link {font-family: 宋体}

a.tj:link {font-weight: normal}

a.tj:link {font-size: 12}

a.tj:link {text-decoration: none}

a.tj:hover {text-decoration: none}

a.tj:link {color: #000000}

a.tj:visited {color: #0000ff}

a.tj:hover {background: #FFFFCC}

h1 {font-size:12px} 

h1 {font-family: "宋体"} 

h1 {font-weight: normal}

h1 {color: #000000}

h2 {font-size:14px} 

h2 {font-family: "宋体"} 

h2 {font-weight: normal}

h2 {color: #000000}

h3 {font-size:24px} 

h3 {font-weight: 1}

h3 {color: #000000}

body {

        margin-top: 1px /*上边距*/

        margin-bottom: 1px /*下边距*/

}

</style>

<meta http-equiv="Content-Type" content="text/html charset=gb2312"></head>

<body>

<p>Mouse over the links to see them change layout.</p>

<p><b><a href="default.asp" target="_blank" class="top">电脑对怀孕其实没啥影响</a></b></p>

<p><b><a href="default.asp" target="_blank" class="tj">电脑对怀孕其实没啥影响</a></b></p>

<h1>电脑对怀孕其实没啥影响</h1>

<h2>电脑对怀孕其实没啥影响</h2>

<h3>电脑对怀孕其实没啥影响</h3>

</body>

</html>