文章简介:CSS使用相对与绝对制作常用新闻框,JQuery附加标题前标点。 |
<!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=utf-8" />
<title>相对与绝对</title>
</head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
<style>
* {margin:0px;padding:0px;list-style-type:none;font-family:arial;font-size:11px;}
body {padding:100px;}
.TableShow {width:480px;position:relative;border:1px solid #eee;padding:34px 10px 10px 10px;}
.TableShow ul {position:absolute;width:100%;height:24px;line-height:24px;left:0px;top:0px;background:#eee;}
.TableShow .title {float:left;margin-left:10px;}
.TableShow .more {float:right;margin-right:10px;}
</style>
<script>
$(document).ready(function() {
$(".TableShow dt").prepend("> ")
});
</script>
<body>
<div class="TableShow">
<ul>
<li class="more">More</li>
<li class="title">Title</li>
</ul>
<dl>
<dt>Title : News Center List</dt>
<dt>Title : News Center List</dt>
<dt>Title : News Center List</dt>
<dt>Title : News Center List</dt>
<dt>Title : News Center List</dt>
</dl>
</div>
</body>
</html>