css 定位
我希望”时间“在左, ”回复此评论“ 在右,现在我是通过中间加空格的方法实现,用css该怎么做?
谢谢
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style type="text/css">
div.test {
outline:1px solid #ccc;
}
div.test > div:first-child {
background-color:#eee;
}
div.test > div:last-child {
overflow:hidden;
background-color:#eee;
}
div.test span:first-child {
color:#fc0;
float:left;
}
div.test span:last-child {
color:#f00;
float:right;
}
</style>
</head>
<body>
<div class="test">
<div>管理员</div>
<p>内容</p>
<div>
<span>昨天</span>
<span>回复</span>
</div>
</div>
</body>
</html>