今天上web课上机实验学会了网页html的制作
实验代码如下
<!DOCTYPE html>
<html>
<head>
<title>信2105-3尹亚博个人主页</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style type="text/css">
table {
border-spacing: 0;
}
div a:link {
color:threedshadow;
text-decoration:none;
}
div a:visited{
color:threedshadow;
text-decoration:none;
}
div a:hover {
color:threedhighlight;
text-decoration:none;
}
div a:active {
color:threedface;
text-decoration:none;
}
p {
font-size: 12pt;
text-indent: 2em;
}
ul{
list-style: none;
}
li {
border-bottom-style: solid;
border-bottom-color: #EEE;
border-bottom-width: thin;
height: 25px;
font-family: "宋体";
font-size: 12pt;
}
#tabtitle{
width: 100%;
font-family: 微软雅黑;
text-align: center;
font-size: 20pt;
}
#tabDiv {
width: 1000px;
margin: 1em auto;
padding-bottom: 10px;
border: #b2c9d3 1px solid;
background: menu;
}
#tabsHead {
padding-left: 0px;
height: 26px;
font-size: 1em;
margin: 1px 0px 0px;
line-height: 26px;
}
#tabContent1{
display: block;
}
#table1{
border-width: 0;
margin: 0;
width: 100%
}
#table2{
border:0px;
width: 700px;
height: 380px;
}
#table2 td{
border: 1px solid grey;
width: 50%;
height: 15px;
}
#tabContent2{
}
.curtab {
padding-top: 0px;
padding-right: 10px;
padding-bottom: 0px;
padding-left: 10px;
border-right: #b2c9d3 1px solid;
font-weight: bold;
float: left;
cursor: pointer;
background: #ffffff;
}
.tabs {
border-right: #c1d8e0 1px solid;
padding: 0px 10px;
font-weight: normal;
float: left;
cursor: pointer;
}
</style>
<script type="text/jscript">
function showTab(tabHeadId,tabContentId)
{
//tab层
var tabDiv = document.getElementById("tabDiv");
var taContents = tabDiv.childNodes;
for(i=0; i<taContents.length; i++)
{
if(taContents[i].id!=null && taContents[i].id != 'tabsHead')
{
taContents[i].style.display = 'none';
}
}
document.getElementById(tabContentId).style.display = 'block';
var tabHeads = document.getElementById('tabsHead').getElementsByTagName('a');
for(i=0; i<tabHeads.length; i++)
{
tabHeads[i].className='tabs';
}
document.getElementById(tabHeadId).className='curtab';
document.getElementById(tabHeadId).blur();
}
</script>
</head>
<body>
<div id="tabtitle" >
信21105-3尹亚博个人主页
</div>
<div id="tabDiv" >
<div id="tabsHead">
<a id="tabs1" class="curtab" href="javascript:showTab('tabs1','tabContent1')">
基本资料
</a>
<a id="tabs2" class="tabs" href="javascript:showTab('tabs2','tabContent2')">
获奖记录
</a>
</div>
<div id="tabContent1" >
<table id="table1" >
<tr>
<td rowspan="3" style="width: 200px; text-align: center">
<img alt="尹亚博" src="images/kk.jpg" style="width: 180px" />
</td>
<td colspan="3" rowspan="3">
<table id="table2" >
<tr>
<td >姓名:尹亚博</td>
<td >生日:2003.04.30</td>
</tr>
<tr>
<td >国籍:中华人民共和国</td>
<td >出生地:河北省邯郸市肥乡区</td>
</tr>
<tr>
<td >身高:183cm</td>
<td >体重:75kg</td>
</tr>
<tr>
<td >血型:B</td>
<td >星座:双子座</td>
</tr>
<tr>
<td colspan="2">
<p>到石家庄读大学</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="tabContent2" style="display: none">
<ul>
<li> 无</li>
</ul>
</div>
</div>
</body>
</html>
标签:总结,style,0px,text,3.17,学习,width,font,border From: https://www.cnblogs.com/yingxq/p/17227864.html