61,129
社区成员




<!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> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="yixianggao@126.com" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
<style type="text/css">
#h
{
height: 55px;
width: 806px;
overflow: auto;
color: white;
}
#h ul
{
background-color: blue;
margin: 0px;
border: 1px solid pink;
}
#h ul li
{
list-style: none;
float: left;
width: 200px;
margin-right: 10px;
background-color: red;
}
</style>
</head>
<body>
<div id="h">
<ul id="demoh">
<li>
<img src="" alt="1" />
</li>
<li>
<img src="" alt="2" />
</li>
<li>
<img src="" alt="3" />
</li>
<li>
<img src="" alt="4" />
</li>
<li>
<img src="" alt="5" />
</li>
<li>
<img src="" alt="6" />
</li>
<li>
<img src="" alt="7" />
</li>
</ul>
</div>
<script type="text/javascript">
<!--
var liWidth = parseInt(demoh.firstChild.currentStyle.width) + parseInt(demoh.firstChild.currentStyle.marginRight);
demoh.style.width = liWidth * demoh.childNodes.length;
//-->
</script>
</body>
</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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="yixianggao@126.com" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
<style type="text/css">
#h
{
height: 55px;
width: 806px;
overflow: auto;
color: white;
}
#h ul
{
background-color: blue;
margin: 0px;
border: 1px solid pink;
width: expression(childNodes.length * 210);
}
#h ul li
{
list-style: none;
float: left;
width: 200px;
margin-right: 10px;
background-color: red;
}
</style>
</head>
<body>
<div id="h">
<ul id="demoh">
<li>
<img src="" alt="1" />
</li>
<li>
<img src="" alt="2" />
</li>
<li>
<img src="" alt="3" />
</li>
<li>
<img src="" alt="4" />
</li>
<li>
<img src="" alt="5" />
</li>
<li>
<img src="" alt="6" />
</li>
<li>
<img src="" alt="7" />
</li>
</ul>
</div>
</body>
</html>