html中的UL li 的CSS应用区别

来源:百度知道 编辑:UC知道 时间:2024/06/27 07:36:51
在DW中的ul li的区别
例:
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
<!--
ul{
list-style-type:none;
}
li {float:left;padding:1px;border:#bfe081 solid 1px;background:url("http://img.baidu.com/img/iknow/sz.gif") no-repeat;}
-->
</style>

</head>

<body>
<ul>
<l

当然可以删,包括li都可以删,看你是想实现什么效果了,需求不同,标签当然不同关键是你对html代码的熟练程度
我运行了一下你的代码 我想你需要的效果是如下吧

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style>
<!--

li {float:left;padding:1px; padding-left:18px;border:#bfe081 solid 1px;background:url("https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/iknow/sz.gif") no-repe