效果

代码

<html>
<head>
<title>Calendar</title>
<style>
<!--
.month {
border-collapse: collapse;
table-layout:fixed;
width:;
}
.month caption {
text-align: left;
font-family: normal % 宋体, arial;
font-size:12px;
font-weight:normal;
padding-bottom: 6px;
} .month caption .date{
font-size:%;
font-weight:bold;
} .month th {
border: 1px solid #;
border-bottom: none;
padding: 3px 2px 2px;
margin:;
background-color: #ADD;
color: #;
font: % 宋体;
}
.month td {
border: 1px solid #AAA;
font: 12px 宋体;
line-height:16px;
padding: 2px 2px;
margin:;
vertical-align: top;
}
.month td.previous, .month td.next {
background-color: #eee;
color: #A6A6A6;
}
.month td.active {
background-color: #B1CBE1;
border: 2px solid #4682B4;
} .month ul {
list-style-type: none;
margin: 3px;
padding:;
} .month li {
color:#fff;
background:transparent url(level-.gif) no-repeat;
padding:2px;
margin-bottom: 6px;
height:34px;
overflow:hidden;
width:100px;
} .month td li.important{
background:transparent url(level-.gif) no-repeat;
} -->
</style>
</head>
<body>
<table class="month" summary="Calendar for 2007.10">
<caption><span class="date">2007年10月 </span></caption>
<tr>
<th scope="col"><span>星期</span>一</th>
<th scope="col"><span>星期</span>二</th>
<th scope="col"><span>星期</span>三</th>
<th scope="col"><span>星期</span>四</th>
<th scope="col"><span>星期</span>五</th>
<th scope="col"><span>星期</span>六</th>
<th scope="col"><span>星期</span>日</th>
</tr>
<tr>
<td class="previous"></td>
<td></td>
<td class="active">
<ul>
<li class="important">完成书稿第2部分</li>
<li>查Javascript相关资料相关资料</li>
</ul>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="active">
<ul>
<li>检查案例实施进度</li>
</ul>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="active">
<ul>
<li class="important">CSS禅意花园案例分析</li>
<li>给Dave回复邮件</li>
</ul>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td class="active">
<ul>
<li>artech.cn网站改版策划</li>
</ul>
</td>
<td class="active">
<ul>
<li>录制CSS视频教程</li>
<li>其他视频教程策划</li>
</ul>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td class="active">
<ul>
<li>中关村图书大厦调研</li>
</ul>
</td>
<td class="active">
<ul>
<li>西单图书大厦调研</li>
<li>北京图书大厦调研</li>
</ul>
</td>
</tr>
<tr>
<td></td>
<td></td>
<td >
</td>
<td class="active">
<ul>
<li class="important">准备出差资料</li>
<li>整理硬盘文件资料</li>
</ul>
</td> <td class="next"></td>
<td class="next"></td>
<td class="next"></td>
</tr>
</table>
</body>
</html>

说明:

巧妙的布局

巧妙的样式

scope定义和用法

scope 属性定义将表头单元与数据单元相关联的方法。

scope 属性标识某个单元是否是列、行、列组或行组的表头。

scope 属性不会在普通浏览器中产生任何视觉变化。

屏幕阅读器可以利用该属性。

详细解释

使用 scope 属性,可以将数据单元格与表头单元格联系起来。

通过属性值 row,表头行包括的所有表格都将和表头单元格联系起来。指定 col,会将当前列的所有单元格和表头单元格绑定起来。

css案例学习之table tr th td ul li实现日历的更多相关文章

  1. css案例学习之用thead、tbody、tfoot实现漂亮的table布局

    首先说说thead.tbody.tfoot <thead> <tbody> <tfoot> 无论前后顺序如何改变, <thead> 内的元素总是在表的最 ...

  2. css案例学习之ul li dl dt dd实现二级菜单

    效果 代码实现 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www ...

  3. css案例学习之盒子模型

    定义:每个盒子都有:边界.边框.填充.内容四个属性: 每个属性都包括四个部分:上.右.下.左:这四部分可同时设置,也可分别设置:里的抗震辅料厚度,而边框有大小和颜色之分,我们又可以理解为生活中所见盒子 ...

  4. css案例学习之继承关系

    代码 <html> <head> <title>继承关系</title> <style> body{ color:blue; /* 颜色 * ...

  5. CSS 案例学习

    1.样式 display:inline-block;可改变a标签,合其可定义宽高 2.a:hover表示鼠标经过 3.background:url(110.png) bottom 表示:给链接一个图片 ...

  6. table tr foreach td 换行

    @{ ;} <table style=" class="sy_table"> <tr> @foreach (DataRow dr in (View ...

  7. css案例学习之relative与absolute

    代码 <!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o ...

  8. css案例学习之float浮动

    代码: <!DOCTYPE html PUBliC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3. ...

  9. css案例学习之class执行的顺序

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

随机推荐

  1. Friendly number

    Friendly number Long numbers can be made to look nicer, so let’s write some code to do just that. Yo ...

  2. YUM配置

    一.yum环境的本地源搭建(基于VSFTP): 1)安装vsftp;    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@         [root ...

  3. SQL Server (MSSQLSERVER) 服务因 找不到指定的模块。 服务特定错误而停止。

    新装了sql server 2008,发现sqlserver 服务没法起来.查看系统日志是7024如下: 事件类型: 错误 事件来源: Service Control Manager 事件种类: 无 ...

  4. 《Java程序员面试笔试宝典》之为什么需要public static void main(String[] args)这个方法

    public staticvoid main(String[] args)为Java程序的入口方法,JVM在运行程序的时候,会首先查找main方法.其中,public是权限修饰符,表明任何类或对象都可 ...

  5. SqlServer 查询表、表说明、关联表、字段说明,语句汇总

    ----查询所有的表 SELECT * FROM SYSOBJECTS WHERE TYPE='U' ----根据表名查询所有的字段名及其注释 SELECT A.NAME,B.VALUE FROM S ...

  6. XNOR-Net ImageNet Classification Using Binary Convolutional Neural Networks

    转载请注明出处: http://www.cnblogs.com/sysuzyq/p/6245186.html by 少侠阿朱

  7. poj3358数论(欧拉定理)

    http://poj.org/problem?id=3358 (初始状态为分数形式)小数点进制转换原理:n / m ; n /= gcd( n , m ) ; m/= gcd( n , m ) ; n ...

  8. linux下git使用记录1 git 提交

    linux下git使用记录1   浏览:985 发布日期:2013/08/08 分类:技术分享 在使用github的时候,不可避免的接触到了git,用他来更新项目,做版本控制.这里特别把常用的命令记录 ...

  9. Android系统,动态找出一个包下所有的类

    最近在写一个android应用,由于针对不同机型功能很不同,为了隔离变化,希望将各项功能插件化,通过编译开关来控制不同版本的功能,而不是在代码中通过逻辑来判断. 我想了一个办法,用表驱动的方法,结合插 ...

  10. UIwebView的html字符串高度计算

    ) { webView = [[UIWebView alloc]initWithFrame:CGRectMake(, , DEVW-, webviewH)]; webView.delegate = s ...