科技时代新浪首页 > 科技时代 > 学园 > 正文

网页技巧 用UL实现非Table四行三列布局


http://www.sina.com.cn 2006年03月29日 11:30 天极yesky

  作者:猴年马月

  先看看效果:

  网页技巧用UL实现非Table四行三列布局
效果图

  下面是源代码:

<html>
<head>
<title>test</title>
<style type="text/css">
ul{
 margin:0px;
 padding:0px;
 width:200px;
 }
ul li{
 float:left;
 list-style-type:none;
 border-top:#000 solid 1px;
                border-left:#000 solid 1px;
 width:65px;
 }
.border-r{
               border-right:#000 solid 1px;
                }
.border-b{
               border-bottom:#000 solid 1px;
                }
.border-l{
               border-right:#000 solid 1px;
               border-bottom:#000 solid 1px;
                }
</style>
</head>
<body>
<ul>
 <li>&nbsp;</li>
 <li>&nbsp;</li>
 <li class="border-r">&nbsp;</li>
</ul>
<ul>
 <li>&nbsp;</li>
 <li>&nbsp;</li>
 <li class="border-r">&nbsp;</li>
</ul>
<ul>
 <li>&nbsp;</li>
 <li>&nbsp;</li>
 <li class="border-r">&nbsp;</li>
</ul>
<ul>
 <li class="border-b">&nbsp;</li>
 <li class="border-b">&nbsp;</li>
 <li class="border-l">&nbsp;</li>
</ul>
</body>
</html>

  将上面的代码保存成html格式的网页文档就能看到效果了。

发表评论

爱问(iAsk.com) 相关网页共约14,100,000篇。



评论】【论坛】【收藏此页】【 】【多种方式看新闻】【下载点点通】【打印】【关闭




科技时代意见反馈留言板 电话:010-82628888-5595   欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

Copyright © 1996 - 2006 SINA Corporation, All Rights Reserved

新浪公司 版权所有