手机
当前位置:查字典教程网 >网页设计 >XHTML >ul和li 基本用法分析
ul和li 基本用法分析
摘要:导航,少量数据表格,居中ul和li应用#menu{width:1000px;height:35px;float:right;margin:0...

导航,少量数据表格,居中

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

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>ul和li应用</title>

<style type="text/css">

#menu{width:1000px;height:35px;float:right;margin:0px; clear:both; vertical-align: bottom;}

#ul li{list-style-type:none; clear:both;width:100px;display:inline; font-size: larger;}

#myul li{float:left;width:100px;}

</style>

</head>

<body>

<div id="menu">

<ul id="ul">

<li><a title="" href="http://localhost:1435/BookShop/index.aspx">首页 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/hybooks.aspx">行业图书 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/Clothing.aspx">服饰潮流 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">美容会所 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">妈咪宝贝 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">礼品书籍 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">新闻资讯 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">用户留言 </a></li>

<li><a title="" href="http://localhost:1435/BookShop/">联系我们 </a></li>

</ul>

</div>

<div>默认是竖排,并且带圆点

<ul>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

</ul>

</div>

<div>

<ul>

<li style="list-style-type:none;">去掉圆点</li>

<li style="display:inline;">hello</li>

<li>hello</li>

<li style="display:inline;">hello</li>

</ul>

</div>

<>

<div style="text-align:center;background:#def">

<ul style="width:150px;background:#eee;">

<li style="float:left;">hello</li>

<li style="float:left;">hello</li>

<li style="float:left;">hello</li>

<li style="float:left;">hello</li>

<li style="float:left;">hello</li>

</ul>

</div>

<>

<div style="text-align:center;background:#eef">

<ul id="myul" style="width:300px;background:#eee">

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

<li>hello</li>

</ul>

</div>

</body>

</html>

【ul和li 基本用法分析】相关文章:

HTML 基本语法 方便刚开始学习html的朋友

标签 li 是不是块级元素分析

html文档基本结构(制作网页基础知识)

html tbody 用法

浅谈:nofollow标签的使用与分析

HTML基本结构全面了解

通过disabled和readonly将input设置为只读效果

HTML和CSS在Flash中的应用

html ReadOnly 和 Enabled 区别

Iframe和FRAME的区别分析

精品推荐
分类导航