网页制作 
首页 > 网页制作 > 浏览文章

CSS table 单行布局示例代码

(编辑:jimmy 日期: 2024/11/17 浏览:3 次 )

复制代码代码如下:
<html>
<head>
<mce:style type="text/css"><!--
table{border-collapse:collapse;}
td{border:1px blue solid;}
--></mce:style>
<style type="text/css" mce_bogus="1">
table{border-collapse:collapse;}
td{border:1px blue solid;}
</style>
</head>
<body>
<br/><br/><br/><br/>
<table width="50%" align="center">
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
</table>
</body>
</html>
<!-- table与tr背景色反色方式 -->
<html>
<head>
<mce:style type="text/css"><!--
table{background:#0000FF;}
tr{background:#FFFFFF;}
--></mce:style><style type="text/css" mce_bogus="1">
table{background:#0000FF;}
tr{background:#FFFFFF;}
</style>
</head>
<body>
<br/><br/><br/><br/>
<table width="50%" align="center" cellspacing="0">
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
<tr>
<td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td><td>asdf</td>
</tr>
</table>
</body>
</html>
上一篇:固定宽高且DIV绝对居中实现思路及示例
下一篇:火狐下easyui1.3.*弹出window框无法定位到中间问题解决
一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。