个性课表静态网页的制作
效果图:
主要运用知识:html ,css
这里是把主页面分成三个div区块:
一个是课表头部;
一个是课表月份以及课的节数;
还有一个是星期,日期和课名;
第二个和第三个星期日期是用表格
第三个课名用列表来做
内容比较简单,所以没有添加注释
html 代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>课表</title>
<link rel="stylesheet" type="text/css" href="classstyle/classstyle.css" />
</head>
<body>
<div class="main">
<div class="top">
<em>课表(第3周)</em>
</div>
<div class="number">
<table border="0px" cellpadding="0" cellspacing="0">
<th>03月</th>
<tr>
<td>1</td>
</tr>
<tr>
<td>2</td>
</tr>
<tr>
<td>3</td>
</tr>
<tr>
<td>4</td>
</tr>
<tr>
<td>5</td>
</tr>
<tr>
<td>6</td>
</tr>
<tr>
<td>7</td>
</tr>
<tr>
<td>8</td>
</tr>
<tr>
<td>9</td>
</tr>
<tr>
<td>10</td>
</tr>
<tr>
<td>11</td>
</tr>
<tr>
<td>12</td>
</tr>
</table>
</div>
<div class="class_date">
<div class="week">
<table border="0px" cellpadding="0" cellspacing="0">
<tr>
<td>周一</td>
<td class="xz">周二</td>
<td>周三</td>
<td>周四</td>
<td>周五</td>
</tr>
<tr>
<td>11日</td>
<td class="xz">12日</td>
<td>13日</td>
<td>14日</td>
<td>15日</td>
</tr>
</table>
</div>
<div class="class_morning">
<ul>
<li class="by"><em>编译原理@三教204</em></li>
<li class="arm"><em>ARM体系结构@三教510</em></li>
<li class="by"><em>编译原理@三教204</em></li>
<li class="arm"><em>ARM体系结构@三教510</em></li>
<li class="rgzn"><em>人工智能@三教504</em></li>
<li class="rj"><em>软件工程@三教410</em></li>
<li class="tx"><em>计算机图形学@三教104</em></li>
<li class="rgzn"><em>人工智能@三教504</em></li>
<li class="tx"><em>计算机图形学@三教104</em></li>
<li class=""></li>
</ul>
</div>
<div class="class_afternoon">
<ul>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class="rj"><em>软件工程@三教410</em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
</ul>
</div>
<div class="class_night">
<ul>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
<li class=""><em></em></li>
</ul>
<a href="#"><img src="images/图层 1.jpg" title="选项" /></a>
</div>
</div>
</div>
</body>
</html>
css代码:
@charset "utf-8";
/* CSS Document */
body,h1,h2,h3,h4,h5,h6,a,ul,li,ol,p,em,i,table,th,tr,td,img,div,span{margin: 0px;padding: 0px;}
body{font-size: 12px;font-family: "微软雅黑"; color: aliceblue;}
li{list-style: none;}
em,i{font-style: normal;}
a{text-decoration: none;}
.by{background-color: #92c0d6;}
.arm{background-color: #f5aaab;}
.rj{background-color: #d7b271;}
.tx{background-color: #26a495;}
.rgzn{background-color: #2cb5f5;}
.xz{background-color: #73b4ef;}
.main{
background-color:#c4e2fe;
width: 540px;
height: 1040px;
margin: 0px auto;
}
.top{
background: #73b4ef;
padding-top: 50px;
width: 540px;
height: 49px;
text-align: center;
}
.top em{
line-height: 25px;
font-size: 25px;
}
.number{
float:left;
width: 25px;
height:941px;
}
.number table{
border:0px solid #73b4ef;
color:#666666;
}
.number table th{
font-size: 15px;
text-align: center;
width: 24px;
height: 50px;
border-right: 2px solid #73b4ef;
border-bottom: 2px solid #73b4ef;
}
.number table tr td{
text-align: center;
font-size: 15px;
width: 24px;
height: 74px;
border-right: 2px solid #73b4ef;
}
.class_date{
float:left;
width: 515px;
height:941px;
}
.week{
width: 515px;
height: 50px;
border-bottom: 2px solid #73b4ef;
}
.week table{
color:#666666;
font-size: 15px;
}
.week table tr td{
width: 103px;
height: 25px;
text-align: center;
}
.class_morning{
width: 515px;
height: 291px;
border-bottom: 2px solid #73b4ef;
}
.class_morning ul li{
border-radius: 7px;
float: left;
padding:50px 5px;
width: 91px;
height: 43px;
margin: 1px 1px;
line-height: 20px;
}
.class_morning ul li em{
font-size: 13px;
}
.class_afternoon{
width: 515px;
height: 291px;
border-bottom: 2px solid #73b4ef;
}
.class_afternoon ul li{
border-radius: 7px;
float: left;
padding:50px 5px;
width: 91px;
height: 43px;
margin: 1px 1px;
line-height: 20px;
}
.class_afternoon ul li em{
font-size: 13px;
}
.class_night{
position: relative;
width: 515px;
height: 300px;
}
.class_night ul li{
border-radius: 7px;
float: left;
padding:50px 5px;
width: 91px;
height: 43px;
margin: 1px 1px;
line-height: 20px;
}
.class_night ul li em{
font-size: 13px;
}
.class_night img{
position: absolute;
width: 58px;
height: 58px;
bottom: 1px;
right: 25px;
}
第一次写博客就这样啦!